Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update language pack grammars #854

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 61 additions & 61 deletions org.eclipse.tm4e.language_pack/README.md

Large diffs are not rendered by default.

124 changes: 62 additions & 62 deletions org.eclipse.tm4e.language_pack/about.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion org.eclipse.tm4e.language_pack/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@
<!-- ======================================== -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type id="org.eclipse.tm4e.language_pack.yaml" name="YAML" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
file-extensions="cff,eyaml,eyml,yaml,yaml-tmlanguage,yaml-tmpreferences,yaml-tmtheme,yml" />
file-extensions="cff,eyaml,eyml,winget,yaml,yaml-tmlanguage,yaml-tmpreferences,yaml-tmtheme,yml" />
</extension>
<extension point="org.eclipse.tm4e.registry.grammars">
<grammar scopeName="source.yaml" path="syntaxes/yaml/yaml.tmLanguage.json" />
Expand Down

Large diffs are not rendered by default.

98 changes: 95 additions & 3 deletions org.eclipse.tm4e.language_pack/syntaxes/go/go.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/worlpaker/go-syntax/commit/ce0d1d19653dc264d8e53f97cb45cc8d1689f221",
"version": "https://github.com/worlpaker/go-syntax/commit/32bbaebcf218fa552e8f0397401e12f6e94fa3c5",
"name": "Go",
"scopeName": "source.go",
"patterns": [
Expand Down Expand Up @@ -1370,7 +1370,53 @@
}
},
{
"include": "#parameter-variable-types"
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "(?:\\w+)",
"name": "entity.name.type.go"
}
]
},
"2": {
"name": "punctuation.definition.begin.bracket.square.go"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.square.go"
}
},
"patterns": [
{
"include": "#generic_param_types"
}
]
},
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.begin.bracket.round.go"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.round.go"
}
},
"patterns": [
{
"include": "#function_param_types"
}
]
},
{
"comment": "other types",
Expand Down Expand Up @@ -1483,7 +1529,53 @@
}
},
{
"include": "#parameter-variable-types"
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "(?:\\w+)",
"name": "entity.name.type.go"
}
]
},
"2": {
"name": "punctuation.definition.begin.bracket.square.go"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.square.go"
}
},
"patterns": [
{
"include": "#generic_param_types"
}
]
},
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.begin.bracket.round.go"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.round.go"
}
},
"patterns": [
{
"include": "#function_param_types"
}
]
},
{
"comment": "other types",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,18 @@
"appendText": "\t",
}
},
// Add // when pressing enter from inside line comment
{
"beforeText": {
"pattern": "\/\/.*"
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": {
"indent": "none",
"appendText": "// "
}
},
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/b80b7509a78e642f789c567e144ed951ab98b4e3",
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/48f608692aa6d6ad7bd65b478187906c798234a8",
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"patterns": [
Expand Down Expand Up @@ -2412,7 +2412,7 @@
"include": "#comment"
},
{
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
"captures": {
"1": {
"name": "keyword.control.type.js"
Expand All @@ -2427,13 +2427,19 @@
"name": "variable.other.readwrite.js"
},
"5": {
"name": "string.quoted.alias.js"
},
"12": {
"name": "keyword.control.as.js"
},
"6": {
"13": {
"name": "keyword.control.default.js"
},
"7": {
"14": {
"name": "variable.other.readwrite.alias.js"
},
"15": {
"name": "string.quoted.alias.js"
}
}
},
Expand All @@ -2449,13 +2455,16 @@
"match": "\\b(default)\\b"
},
{
"match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
"match": "(?:(\\btype)\\s+)?(?:([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
"captures": {
"1": {
"name": "keyword.control.type.js"
},
"2": {
"name": "variable.other.readwrite.alias.js"
},
"3": {
"name": "string.quoted.alias.js"
}
}
}
Expand Down Expand Up @@ -2636,13 +2645,13 @@
},
{
"name": "string.regexp.js",
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.js"
}
},
"end": "(/)([dgimsuy]*)",
"end": "(/)([dgimsuvy]*)",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.end.js"
Expand Down Expand Up @@ -4889,13 +4898,13 @@
"patterns": [
{
"name": "string.regexp.js",
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"beginCaptures": {
"1": {
"name": "punctuation.definition.string.begin.js"
}
},
"end": "(/)([dgimsuy]*)",
"end": "(/)([dgimsuvy]*)",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.end.js"
Expand All @@ -4912,13 +4921,13 @@
},
{
"name": "string.regexp.js",
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.js"
}
},
"end": "(/)([dgimsuy]*)",
"end": "(/)([dgimsuvy]*)",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.end.js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,18 @@
"appendText": "\t",
}
},
// Add // when pressing enter from inside line comment
{
"beforeText": {
"pattern": "\/\/.*"
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": {
"indent": "none",
"appendText": "// "
}
},
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/b80b7509a78e642f789c567e144ed951ab98b4e3",
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/48f608692aa6d6ad7bd65b478187906c798234a8",
"name": "JavaScript (with React support)",
"scopeName": "source.js.jsx",
"patterns": [
Expand Down Expand Up @@ -2412,7 +2412,7 @@
"include": "#comment"
},
{
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
"captures": {
"1": {
"name": "keyword.control.type.js.jsx"
Expand All @@ -2427,13 +2427,19 @@
"name": "variable.other.readwrite.js.jsx"
},
"5": {
"name": "string.quoted.alias.js.jsx"
},
"12": {
"name": "keyword.control.as.js.jsx"
},
"6": {
"13": {
"name": "keyword.control.default.js.jsx"
},
"7": {
"14": {
"name": "variable.other.readwrite.alias.js.jsx"
},
"15": {
"name": "string.quoted.alias.js.jsx"
}
}
},
Expand All @@ -2449,13 +2455,16 @@
"match": "\\b(default)\\b"
},
{
"match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
"match": "(?:(\\btype)\\s+)?(?:([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
"captures": {
"1": {
"name": "keyword.control.type.js.jsx"
},
"2": {
"name": "variable.other.readwrite.alias.js.jsx"
},
"3": {
"name": "string.quoted.alias.js.jsx"
}
}
}
Expand Down Expand Up @@ -2636,13 +2645,13 @@
},
{
"name": "string.regexp.js.jsx",
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.js.jsx"
}
},
"end": "(/)([dgimsuy]*)",
"end": "(/)([dgimsuvy]*)",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.end.js.jsx"
Expand Down Expand Up @@ -4889,13 +4898,13 @@
"patterns": [
{
"name": "string.regexp.js.jsx",
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"beginCaptures": {
"1": {
"name": "punctuation.definition.string.begin.js.jsx"
}
},
"end": "(/)([dgimsuy]*)",
"end": "(/)([dgimsuvy]*)",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.end.js.jsx"
Expand All @@ -4912,13 +4921,13 @@
},
{
"name": "string.regexp.js.jsx",
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.js.jsx"
}
},
"end": "(/)([dgimsuy]*)",
"end": "(/)([dgimsuvy]*)",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.end.js.jsx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,18 @@
"appendText": "\t",
}
},
// Add // when pressing enter from inside line comment
{
"beforeText": {
"pattern": "\/\/.*"
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": {
"indent": "none",
"appendText": "// "
}
},
]
}
Loading
Loading