Skip to content

Commit

Permalink
feat: switch to official & maintained nix grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
uncenter committed May 12, 2024
1 parent e28f36b commit 42fe7dd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
8 changes: 3 additions & 5 deletions packages/tm-grammars/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -5521,12 +5521,12 @@ THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

=========================================================================================================
Files: nix.json
License: https://raw.githubusercontent.com/bbenoist/vscode-nix/master/LICENSE.md
License: https://raw.githubusercontent.com/nix-community/vscode-nix-ide/main/LICENSE
SPDX: MIT
---------------------------------------------------------------------------------------------------------
The MIT License (MIT)
MIT License

Copyright (c) 2015 bbenoist
Copyright (c) 2020 noor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -5545,8 +5545,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


=========================================================================================================
Files: nushell.json
License: https://raw.githubusercontent.com/nushell/vscode-nushell-lang/main/LICENSE
Expand Down
2 changes: 1 addition & 1 deletion packages/tm-grammars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ import { grammars } from 'tm-grammars'
| `nextflow` | `nf` | [nextflow-io/vscode-language-nextflow](https://github.com/nextflow-io/vscode-language-nextflow/blob/7eeb9be8d01556b7c51c59307275c2f720f2ddf4/syntaxes/nextflow.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/nextflow-io/vscode-language-nextflow/master/LICENSE.md) | | 4.40 kB |
| `nginx` | | [hangxingliu/vscode-nginx-conf-hint](https://github.com/hangxingliu/vscode-nginx-conf-hint/blob/49159c02fd09dce264ded7802c9499a0f09646f5/src/syntax/nginx.tmLanguage) | [GPL-3.0](https://raw.githubusercontent.com/hangxingliu/vscode-nginx-conf-hint/main/LICENSE) | `lua` | 34.14 kB |
| `nim` | | [pragmagic/vscode-nim](https://github.com/pragmagic/vscode-nim/blob/0272a0544ddf147fde98f8a8f2b624b7dcb19eb3/syntaxes/nim.json) | [NOASSERTION](https://raw.githubusercontent.com/pragmagic/vscode-nim/master/LICENSE) | `c` `html` `xml` `javascript` `css` `glsl` `markdown` | 21.82 kB |
| `nix` | | [bbenoist/vscode-nix](https://github.com/bbenoist/vscode-nix/blob/9a7c81109624431e032d9b02c8029b13bc2000c8/syntaxes/nix.tmLanguage) | [MIT](https://raw.githubusercontent.com/bbenoist/vscode-nix/master/LICENSE.md) | | 14.32 kB |
| `nix` | | [nix-community/vscode-nix-ide](https://github.com/nix-community/vscode-nix-ide/blob/cd420d0bcea26cf1cf650f47c738bd1b6658a80c/syntaxes/nix.YAML-tmLanguage) | [MIT](https://raw.githubusercontent.com/nix-community/vscode-nix-ide/main/LICENSE) | | 14.36 kB |
| `nushell` | `nu` | [nushell/vscode-nushell-lang](https://github.com/nushell/vscode-nushell-lang/blob/359e3a69c516c996e5bcd7161290f78feaebbbfb/syntaxes/nushell.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/nushell/vscode-nushell-lang/main/LICENSE) | | 18.38 kB |
| `objective-c` | `objc` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/bd1abe08c38bb5deccf65610f8f3c03d2338d20d/extensions/objective-c/syntaxes/objective-c.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 103.61 kB |
| `objective-cpp` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/bd1abe08c38bb5deccf65610f8f3c03d2338d20d/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 168.52 kB |
Expand Down
10 changes: 5 additions & 5 deletions packages/tm-grammars/grammars/nix.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
"end": "(?=([\\])};]|\\b(else|then)\\b))",
"patterns": [
{
"begin": "(?=(\\s*\\}|\\\"|\\binherit\\b|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))",
"begin": "(?=(\\s*\\}|\\\"|\\binherit\\b|\\$\\{|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))",
"end": "(?=([\\])};,]|\\b(else|then)\\b))",
"patterns": [
{
Expand Down Expand Up @@ -355,7 +355,7 @@
]
},
"bad-reserved": {
"match": "\\b(if|then|else|assert|with|let|in|rec|inherit)\\b",
"match": "(?<![\\w'-])(if|then|else|assert|with|let|in|rec|inherit)(?![\\w'-])",
"name": "invalid.illegal.reserved.nix"
},
"comment": {
Expand Down Expand Up @@ -891,7 +891,7 @@
"name": "punctuation.section.embedded.end.nix"
}
},
"name": "markup.italic",
"name": "meta.embedded",
"patterns": [
{
"include": "#expression"
Expand Down Expand Up @@ -1111,7 +1111,7 @@
]
},
{
"begin": "([a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)",
"begin": "(~?[a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)",
"beginCaptures": {
"0": {
"name": "string.unquoted.path.nix"
Expand Down Expand Up @@ -1182,7 +1182,7 @@
"match": "\\s+"
},
"with-assert": {
"begin": "\\b(with|assert)\\b",
"begin": "(?<![\\w'-])(with|assert)(?![\\w'-])",
"beginCaptures": {
"0": {
"name": "keyword.other.nix"
Expand Down
10 changes: 5 additions & 5 deletions packages/tm-grammars/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1975,15 +1975,15 @@ export const grammars = [
source: 'https://github.com/pragmagic/vscode-nim/blob/0272a0544ddf147fde98f8a8f2b624b7dcb19eb3/syntaxes/nim.json',
},
{
byteSize: 14665,
byteSize: 14708,
displayName: 'Nix',
lastUpdate: '2015-12-03T18:27:32Z',
lastUpdate: '2022-04-17T09:05:16Z',
license: 'MIT',
licenseUrl: 'https://raw.githubusercontent.com/bbenoist/vscode-nix/master/LICENSE.md',
licenseUrl: 'https://raw.githubusercontent.com/nix-community/vscode-nix-ide/main/LICENSE',
name: 'nix',
scopeName: 'source.nix',
sha: '9a7c81109624431e032d9b02c8029b13bc2000c8',
source: 'https://github.com/bbenoist/vscode-nix/blob/9a7c81109624431e032d9b02c8029b13bc2000c8/syntaxes/nix.tmLanguage',
sha: 'cd420d0bcea26cf1cf650f47c738bd1b6658a80c',
source: 'https://github.com/nix-community/vscode-nix-ide/blob/cd420d0bcea26cf1cf650f47c738bd1b6658a80c/syntaxes/nix.YAML-tmLanguage',
},
{
aliases: [
Expand Down
3 changes: 2 additions & 1 deletion sources-grammars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,8 @@ export const sourcesCommunity: GrammarSource[] = [
},
{
name: 'nix',
source: 'https://github.com/bbenoist/vscode-nix/blob/master/syntaxes/nix.tmLanguage',
displayName: 'Nix',
source: 'https://github.com/nix-community/vscode-nix-ide/blob/main/syntaxes/nix.YAML-tmLanguage',
},
{
name: 'nushell',
Expand Down

0 comments on commit 42fe7dd

Please sign in to comment.