Skip to content

Commit a3d1dae

Browse files
committed
feat: update language pack grammars
1 parent 28436a0 commit a3d1dae

15 files changed

Lines changed: 457 additions & 276 deletions

org.eclipse.tm4e.language_pack/README.md

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

org.eclipse.tm4e.language_pack/about.html

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

org.eclipse.tm4e.language_pack/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@
14431443
<!-- ======================================== -->
14441444
<extension point="org.eclipse.core.contenttype.contentTypes">
14451445
<content-type id="org.eclipse.tm4e.language_pack.yaml" name="YAML" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
1446-
file-extensions="cff,eyaml,eyml,yaml,yaml-tmlanguage,yaml-tmpreferences,yaml-tmtheme,yml" />
1446+
file-extensions="cff,eyaml,eyml,winget,yaml,yaml-tmlanguage,yaml-tmpreferences,yaml-tmtheme,yml" />
14471447
</extension>
14481448
<extension point="org.eclipse.tm4e.registry.grammars">
14491449
<grammar scopeName="source.yaml" path="syntaxes/yaml/yaml.tmLanguage.json" />

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

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

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

Lines changed: 95 additions & 3 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/worlpaker/go-syntax/commit/ce0d1d19653dc264d8e53f97cb45cc8d1689f221",
7+
"version": "https://github.com/worlpaker/go-syntax/commit/32bbaebcf218fa552e8f0397401e12f6e94fa3c5",
88
"name": "Go",
99
"scopeName": "source.go",
1010
"patterns": [
@@ -1370,7 +1370,53 @@
13701370
}
13711371
},
13721372
{
1373-
"include": "#parameter-variable-types"
1373+
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
1374+
"beginCaptures": {
1375+
"1": {
1376+
"patterns": [
1377+
{
1378+
"include": "#type-declarations"
1379+
},
1380+
{
1381+
"match": "(?:\\w+)",
1382+
"name": "entity.name.type.go"
1383+
}
1384+
]
1385+
},
1386+
"2": {
1387+
"name": "punctuation.definition.begin.bracket.square.go"
1388+
}
1389+
},
1390+
"end": "\\]",
1391+
"endCaptures": {
1392+
"0": {
1393+
"name": "punctuation.definition.end.bracket.square.go"
1394+
}
1395+
},
1396+
"patterns": [
1397+
{
1398+
"include": "#generic_param_types"
1399+
}
1400+
]
1401+
},
1402+
{
1403+
"begin": "\\(",
1404+
"beginCaptures": {
1405+
"0": {
1406+
"name": "punctuation.definition.begin.bracket.round.go"
1407+
}
1408+
},
1409+
"end": "\\)",
1410+
"endCaptures": {
1411+
"0": {
1412+
"name": "punctuation.definition.end.bracket.round.go"
1413+
}
1414+
},
1415+
"patterns": [
1416+
{
1417+
"include": "#function_param_types"
1418+
}
1419+
]
13741420
},
13751421
{
13761422
"comment": "other types",
@@ -1483,7 +1529,53 @@
14831529
}
14841530
},
14851531
{
1486-
"include": "#parameter-variable-types"
1532+
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
1533+
"beginCaptures": {
1534+
"1": {
1535+
"patterns": [
1536+
{
1537+
"include": "#type-declarations"
1538+
},
1539+
{
1540+
"match": "(?:\\w+)",
1541+
"name": "entity.name.type.go"
1542+
}
1543+
]
1544+
},
1545+
"2": {
1546+
"name": "punctuation.definition.begin.bracket.square.go"
1547+
}
1548+
},
1549+
"end": "\\]",
1550+
"endCaptures": {
1551+
"0": {
1552+
"name": "punctuation.definition.end.bracket.square.go"
1553+
}
1554+
},
1555+
"patterns": [
1556+
{
1557+
"include": "#generic_param_types"
1558+
}
1559+
]
1560+
},
1561+
{
1562+
"begin": "\\(",
1563+
"beginCaptures": {
1564+
"0": {
1565+
"name": "punctuation.definition.begin.bracket.round.go"
1566+
}
1567+
},
1568+
"end": "\\)",
1569+
"endCaptures": {
1570+
"0": {
1571+
"name": "punctuation.definition.end.bracket.round.go"
1572+
}
1573+
},
1574+
"patterns": [
1575+
{
1576+
"include": "#function_param_types"
1577+
}
1578+
]
14871579
},
14881580
{
14891581
"comment": "other types",

org.eclipse.tm4e.language_pack/syntaxes/javascript/javascript.language-configuration.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,18 @@
228228
"appendText": "\t",
229229
}
230230
},
231+
// Add // when pressing enter from inside line comment
232+
{
233+
"beforeText": {
234+
"pattern": "\/\/.*"
235+
},
236+
"afterText": {
237+
"pattern": "^(?!\\s*$).+"
238+
},
239+
"action": {
240+
"indent": "none",
241+
"appendText": "// "
242+
}
243+
},
231244
]
232245
}

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

Lines changed: 20 additions & 11 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/microsoft/TypeScript-TmLanguage/commit/b80b7509a78e642f789c567e144ed951ab98b4e3",
7+
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/48f608692aa6d6ad7bd65b478187906c798234a8",
88
"name": "JavaScript (with React support)",
99
"scopeName": "source.js",
1010
"patterns": [
@@ -2412,7 +2412,7 @@
24122412
"include": "#comment"
24132413
},
24142414
{
2415-
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
2415+
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
24162416
"captures": {
24172417
"1": {
24182418
"name": "keyword.control.type.js"
@@ -2427,13 +2427,19 @@
24272427
"name": "variable.other.readwrite.js"
24282428
},
24292429
"5": {
2430+
"name": "string.quoted.alias.js"
2431+
},
2432+
"12": {
24302433
"name": "keyword.control.as.js"
24312434
},
2432-
"6": {
2435+
"13": {
24332436
"name": "keyword.control.default.js"
24342437
},
2435-
"7": {
2438+
"14": {
24362439
"name": "variable.other.readwrite.alias.js"
2440+
},
2441+
"15": {
2442+
"name": "string.quoted.alias.js"
24372443
}
24382444
}
24392445
},
@@ -2449,13 +2455,16 @@
24492455
"match": "\\b(default)\\b"
24502456
},
24512457
{
2452-
"match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
2458+
"match": "(?:(\\btype)\\s+)?(?:([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
24532459
"captures": {
24542460
"1": {
24552461
"name": "keyword.control.type.js"
24562462
},
24572463
"2": {
24582464
"name": "variable.other.readwrite.alias.js"
2465+
},
2466+
"3": {
2467+
"name": "string.quoted.alias.js"
24592468
}
24602469
}
24612470
}
@@ -2636,13 +2645,13 @@
26362645
},
26372646
{
26382647
"name": "string.regexp.js",
2639-
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2648+
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
26402649
"beginCaptures": {
26412650
"0": {
26422651
"name": "punctuation.definition.string.begin.js"
26432652
}
26442653
},
2645-
"end": "(/)([dgimsuy]*)",
2654+
"end": "(/)([dgimsuvy]*)",
26462655
"endCaptures": {
26472656
"1": {
26482657
"name": "punctuation.definition.string.end.js"
@@ -4889,13 +4898,13 @@
48894898
"patterns": [
48904899
{
48914900
"name": "string.regexp.js",
4892-
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4901+
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
48934902
"beginCaptures": {
48944903
"1": {
48954904
"name": "punctuation.definition.string.begin.js"
48964905
}
48974906
},
4898-
"end": "(/)([dgimsuy]*)",
4907+
"end": "(/)([dgimsuvy]*)",
48994908
"endCaptures": {
49004909
"1": {
49014910
"name": "punctuation.definition.string.end.js"
@@ -4912,13 +4921,13 @@
49124921
},
49134922
{
49144923
"name": "string.regexp.js",
4915-
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4924+
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
49164925
"beginCaptures": {
49174926
"0": {
49184927
"name": "punctuation.definition.string.begin.js"
49194928
}
49204929
},
4921-
"end": "(/)([dgimsuy]*)",
4930+
"end": "(/)([dgimsuvy]*)",
49224931
"endCaptures": {
49234932
"1": {
49244933
"name": "punctuation.definition.string.end.js"

org.eclipse.tm4e.language_pack/syntaxes/javascript/javascriptreact.language-configuration.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,18 @@
228228
"appendText": "\t",
229229
}
230230
},
231+
// Add // when pressing enter from inside line comment
232+
{
233+
"beforeText": {
234+
"pattern": "\/\/.*"
235+
},
236+
"afterText": {
237+
"pattern": "^(?!\\s*$).+"
238+
},
239+
"action": {
240+
"indent": "none",
241+
"appendText": "// "
242+
}
243+
},
231244
]
232245
}

org.eclipse.tm4e.language_pack/syntaxes/javascript/javascriptreact.tmLanguage.json

Lines changed: 20 additions & 11 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/microsoft/TypeScript-TmLanguage/commit/b80b7509a78e642f789c567e144ed951ab98b4e3",
7+
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/48f608692aa6d6ad7bd65b478187906c798234a8",
88
"name": "JavaScript (with React support)",
99
"scopeName": "source.js.jsx",
1010
"patterns": [
@@ -2412,7 +2412,7 @@
24122412
"include": "#comment"
24132413
},
24142414
{
2415-
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
2415+
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
24162416
"captures": {
24172417
"1": {
24182418
"name": "keyword.control.type.js.jsx"
@@ -2427,13 +2427,19 @@
24272427
"name": "variable.other.readwrite.js.jsx"
24282428
},
24292429
"5": {
2430+
"name": "string.quoted.alias.js.jsx"
2431+
},
2432+
"12": {
24302433
"name": "keyword.control.as.js.jsx"
24312434
},
2432-
"6": {
2435+
"13": {
24332436
"name": "keyword.control.default.js.jsx"
24342437
},
2435-
"7": {
2438+
"14": {
24362439
"name": "variable.other.readwrite.alias.js.jsx"
2440+
},
2441+
"15": {
2442+
"name": "string.quoted.alias.js.jsx"
24372443
}
24382444
}
24392445
},
@@ -2449,13 +2455,16 @@
24492455
"match": "\\b(default)\\b"
24502456
},
24512457
{
2452-
"match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
2458+
"match": "(?:(\\btype)\\s+)?(?:([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
24532459
"captures": {
24542460
"1": {
24552461
"name": "keyword.control.type.js.jsx"
24562462
},
24572463
"2": {
24582464
"name": "variable.other.readwrite.alias.js.jsx"
2465+
},
2466+
"3": {
2467+
"name": "string.quoted.alias.js.jsx"
24592468
}
24602469
}
24612470
}
@@ -2636,13 +2645,13 @@
26362645
},
26372646
{
26382647
"name": "string.regexp.js.jsx",
2639-
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2648+
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
26402649
"beginCaptures": {
26412650
"0": {
26422651
"name": "punctuation.definition.string.begin.js.jsx"
26432652
}
26442653
},
2645-
"end": "(/)([dgimsuy]*)",
2654+
"end": "(/)([dgimsuvy]*)",
26462655
"endCaptures": {
26472656
"1": {
26482657
"name": "punctuation.definition.string.end.js.jsx"
@@ -4889,13 +4898,13 @@
48894898
"patterns": [
48904899
{
48914900
"name": "string.regexp.js.jsx",
4892-
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4901+
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
48934902
"beginCaptures": {
48944903
"1": {
48954904
"name": "punctuation.definition.string.begin.js.jsx"
48964905
}
48974906
},
4898-
"end": "(/)([dgimsuy]*)",
4907+
"end": "(/)([dgimsuvy]*)",
48994908
"endCaptures": {
49004909
"1": {
49014910
"name": "punctuation.definition.string.end.js.jsx"
@@ -4912,13 +4921,13 @@
49124921
},
49134922
{
49144923
"name": "string.regexp.js.jsx",
4915-
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4924+
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
49164925
"beginCaptures": {
49174926
"0": {
49184927
"name": "punctuation.definition.string.begin.js.jsx"
49194928
}
49204929
},
4921-
"end": "(/)([dgimsuy]*)",
4930+
"end": "(/)([dgimsuvy]*)",
49224931
"endCaptures": {
49234932
"1": {
49244933
"name": "punctuation.definition.string.end.js.jsx"

org.eclipse.tm4e.language_pack/syntaxes/typescript/typescript.language-configuration.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,18 @@
246246
"appendText": "\t",
247247
}
248248
},
249+
// Add // when pressing enter from inside line comment
250+
{
251+
"beforeText": {
252+
"pattern": "\/\/.*"
253+
},
254+
"afterText": {
255+
"pattern": "^(?!\\s*$).+"
256+
},
257+
"action": {
258+
"indent": "none",
259+
"appendText": "// "
260+
}
261+
},
249262
]
250263
}

0 commit comments

Comments
 (0)