Skip to content

Commit 9d031aa

Browse files
authored
feat: update language pack grammars (#962)
1 parent f49b81a commit 9d031aa

13 files changed

Lines changed: 3582 additions & 3151 deletions

org.eclipse.tm4e.language_pack/README.md

Lines changed: 61 additions & 60 deletions
Large diffs are not rendered by default.

org.eclipse.tm4e.language_pack/about.html

Lines changed: 66 additions & 61 deletions
Large diffs are not rendered by default.

org.eclipse.tm4e.language_pack/plugin.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,22 @@
337337
<sample name="Docker Example" path="syntaxes/docker/dockerfile.example.dockerfile" scopeName="source.dockerfile" />
338338
</extension>
339339

340+
<!-- ======================================== -->
341+
<!-- dotenv/dotenv: Dotenv -->
342+
<!-- ======================================== -->
343+
<extension point="org.eclipse.core.contenttype.contentTypes">
344+
<content-type id="org.eclipse.tm4e.language_pack.dotenv" name="Dotenv" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
345+
file-extensions="env" file-names=".env,.flaskenv,user-dirs.dirs" file-patterns=".env.*" />
346+
</extension>
347+
<extension point="org.eclipse.tm4e.registry.grammars">
348+
<grammar scopeName="source.dotenv" path="syntaxes/dotenv/dotenv.tmLanguage.json" />
349+
<scopeNameContentTypeBinding scopeName="source.dotenv" contentTypeId="org.eclipse.tm4e.language_pack.dotenv" />
350+
</extension>
351+
352+
<extension point="org.eclipse.tm4e.languageconfiguration.languageConfigurations">
353+
<languageConfiguration contentTypeId="org.eclipse.tm4e.language_pack.dotenv" path="syntaxes/dotenv/dotenv.language-configuration.json" />
354+
</extension>
355+
340356
<!-- ======================================== -->
341357
<!-- fsharp/fsharp: F# -->
342358
<!-- ======================================== -->
@@ -1270,7 +1286,7 @@
12701286
<!-- ======================================== -->
12711287
<extension point="org.eclipse.core.contenttype.contentTypes">
12721288
<content-type id="org.eclipse.tm4e.language_pack.shellscript" name="Shell Script" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
1273-
file-extensions="Xsession,bash,bash_aliases,bash_login,bash_logout,bash_profile,bashrc,csh,cshrc,ebuild,eclass,fish,ksh,profile,sh,tcshrc,xprofile,xsession,xsessionrc,yash_profile,yashrc,zlogin,zlogout,zprofile,zsh,zsh-theme,zshenv,zshrc" file-names=".envrc,.hushlogin,APKBUILD,PKGBUILD,bashrc_Apple_Terminal,zlogin,zlogout,zprofile,zshenv,zshrc,zshrc_Apple_Terminal" file-patterns=".env.*" />
1289+
file-extensions="Xsession,bash,bash_aliases,bash_login,bash_logout,bash_profile,bashrc,csh,cshrc,ebuild,eclass,fish,ksh,profile,sh,tcshrc,xprofile,xsession,xsessionrc,yash_profile,yashrc,zlogin,zlogout,zprofile,zsh,zsh-theme,zshenv,zshrc" file-names=".envrc,.hushlogin,APKBUILD,PKGBUILD,bashrc_Apple_Terminal,zlogin,zlogout,zprofile,zshenv,zshrc,zshrc_Apple_Terminal" />
12741290
</extension>
12751291
<extension point="org.eclipse.tm4e.registry.grammars">
12761292
<grammar scopeName="source.shell" path="syntaxes/shellscript/shellscript.tmLanguage.json" />

org.eclipse.tm4e.language_pack/syntaxes/csharp/csharp.tmLanguage.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/1381bedfb087c18aca67af8278050d11bc9d9349",
7+
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/c32388ec18690abefb37cbaffa687a338c87d016",
88
"name": "C#",
99
"scopeName": "source.cs",
1010
"patterns": [
@@ -3423,7 +3423,7 @@
34233423
]
34243424
},
34253425
"interpolation": {
3426-
"name": "meta.interpolation.cs",
3426+
"name": "meta.embedded.interpolation.cs",
34273427
"begin": "(?<=[^\\{]|^)((?:\\{\\{)*)(\\{)(?=[^\\{])",
34283428
"beginCaptures": {
34293429
"1": {
@@ -3578,7 +3578,7 @@
35783578
}
35793579
},
35803580
"raw-interpolation": {
3581-
"name": "meta.interpolation.cs",
3581+
"name": "meta.embedded.interpolation.cs",
35823582
"begin": "(?<=[^\\{]|^)((?:\\{)*)(\\{)(?=[^\\{])",
35833583
"beginCaptures": {
35843584
"1": {
@@ -3601,7 +3601,7 @@
36013601
]
36023602
},
36033603
"double-raw-interpolation": {
3604-
"name": "meta.interpolation.cs",
3604+
"name": "meta.embedded.interpolation.cs",
36053605
"begin": "(?<=[^\\{][^\\{]|^)((?:\\{)*)(\\{\\{)(?=[^\\{])",
36063606
"beginCaptures": {
36073607
"1": {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"comments": {
3+
"lineComment": "#"
4+
},
5+
"brackets": [
6+
["{", "}"],
7+
["[", "]"],
8+
["(", ")"]
9+
],
10+
"autoClosingPairs": [
11+
["{", "}"],
12+
["[", "]"],
13+
["(", ")"],
14+
["\"", "\""],
15+
["'", "'"]
16+
],
17+
"surroundingPairs": [
18+
["{", "}"],
19+
["[", "]"],
20+
["(", ")"],
21+
["\"", "\""],
22+
["'", "'"]
23+
]
24+
}
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/dotenv-org/dotenv-vscode/blob/master/syntaxes/dotenv.tmLanguage.json",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
7+
"version": "https://github.com/dotenv-org/dotenv-vscode/commit/e7e41baa5b23e01c1ff0567a4e596c24860e7def",
8+
"scopeName": "source.dotenv",
9+
"patterns": [
10+
{
11+
"comment": "Full Line Comment",
12+
"match": "^\\s?(#.*$)\\n",
13+
"captures": {
14+
"1": {
15+
"patterns": [
16+
{
17+
"include": "#line-comment"
18+
}
19+
]
20+
}
21+
}
22+
},
23+
{
24+
"comment": "ENV entry",
25+
"match": "^\\s?(.*?)\\s?(\\=)(.*)$",
26+
"captures": {
27+
"1": {
28+
"patterns": [
29+
{
30+
"include": "#key"
31+
}
32+
]
33+
},
34+
"2": {
35+
"name": "keyword.operator.assignment.dotenv"
36+
},
37+
"3": {
38+
"name": "property.value.dotenv",
39+
"patterns": [
40+
{
41+
"include": "#line-comment"
42+
},
43+
{
44+
"include": "#double-quoted-string"
45+
},
46+
{
47+
"include": "#single-quoted-string"
48+
},
49+
{
50+
"include": "#interpolation"
51+
}
52+
]
53+
}
54+
}
55+
}
56+
],
57+
"repository": {
58+
"variable": {
59+
"comment": "env variable",
60+
"match": "[a-zA-Z_]+[a-zA-Z0-9_]*"
61+
},
62+
"line-comment": {
63+
"comment": "Comment",
64+
"match": "#.*$",
65+
"name": "comment.line.dotenv"
66+
},
67+
"interpolation": {
68+
"comment": "Interpolation (variable substitution)",
69+
"match": "(\\$\\{)(.*)(\\})",
70+
"captures": {
71+
"1": {
72+
"name": "keyword.interpolation.begin.dotenv"
73+
},
74+
"2": {
75+
"name": "variable.interpolation.dotenv"
76+
},
77+
"3": {
78+
"name": "keyword.interpolation.end.dotenv"
79+
}
80+
}
81+
},
82+
"escape-characters": {
83+
"comment": "Escape characters",
84+
"match": "\\\\[nrtfb\"'\\\\]|\\\\u[0123456789ABCDEF]{4}",
85+
"name": "constant.character.escape.dotenv"
86+
},
87+
"double-quoted-string": {
88+
"comment": "Double Quoted String",
89+
"match": "\"(.*)\"",
90+
"name": "string.quoted.double.dotenv",
91+
"captures": {
92+
"1": {
93+
"patterns": [
94+
{
95+
"include": "#interpolation"
96+
},
97+
{
98+
"include": "#escape-characters"
99+
}
100+
]
101+
}
102+
}
103+
},
104+
"single-quoted-string": {
105+
"comment": "Single Quoted String",
106+
"match": "'(.*)'",
107+
"name": "string.quoted.single.dotenv"
108+
},
109+
"key": {
110+
"comment": "Key",
111+
"match": "(export\\s)?(.*)",
112+
"captures": {
113+
"1": {
114+
"name": "keyword.key.export.dotenv"
115+
},
116+
"2": {
117+
"name": "variable.key.dotenv",
118+
"patterns": [
119+
{
120+
"include": "#variable"
121+
}
122+
]
123+
}
124+
}
125+
}
126+
}
127+
}

org.eclipse.tm4e.language_pack/syntaxes/fsharp/fsharp.tmLanguage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/ionide/ionide-fsgrammar/commit/be3c51d2c28d3aaacd89ecd067e766bebe387f89",
7+
"version": "https://github.com/ionide/ionide-fsgrammar/commit/0cb968a4b8fdb2e0656b95342cdffbeff04a1248",
88
"name": "fsharp",
99
"scopeName": "source.fsharp",
1010
"patterns": [
@@ -1831,7 +1831,7 @@
18311831
"patterns": [
18321832
{
18331833
"name": "keyword.control.directive.fsharp",
1834-
"match": "\\s?(#if|#elif|#elseif|#else|#endif|#light|#nowarn)",
1834+
"match": "\\s?(#if|#elif|#elseif|#else|#endif|#light|#nowarn|#warnon)",
18351835
"captures": {}
18361836
}
18371837
]

org.eclipse.tm4e.language_pack/syntaxes/git-base/ignore.language-configuration.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
{ "open": "(", "close": ")" },
99
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
1010
{ "open": "\"", "close": "\"", "notIn": ["string"] },
11-
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
12-
{ "open": "/**", "close": " */", "notIn": ["string"] }
11+
{ "open": "`", "close": "`", "notIn": ["string", "comment"] }
1312
]
1413
}

0 commit comments

Comments
 (0)