mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Patch js/ts grammars to remove special scopes for node
Fixes #94284 Now the we have semantic highlighting, we should use that to identify if a variable is really from node or not
This commit is contained in:
@@ -3617,30 +3617,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "support.class.node.js.jsx",
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(process)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "support.variable.object.process.js.jsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.accessor.js.jsx"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.accessor.optional.js.jsx"
|
||||
},
|
||||
"4": {
|
||||
"name": "support.variable.property.process.js.jsx"
|
||||
},
|
||||
"5": {
|
||||
"name": "support.function.process.js.jsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
|
||||
"captures": {
|
||||
@@ -3660,10 +3636,6 @@
|
||||
"name": "support.type.object.module.js.jsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "support.variable.object.node.js.jsx",
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user