mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
Remove text mate highlighting of more JS/TS built-ins
Identifying specific symbols is a better fit for semantic highlighting instead of textmate as semantic highlighting prevents false positives This keeps around a few of the most built-ins for now but we may revisit these in the future
This commit is contained in:
@@ -3566,59 +3566,10 @@
|
||||
"name": "variable.language.arguments.js",
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.class.builtin.js",
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array\n |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.class.error.js",
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.class.promise.js",
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.function.js",
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Math)(?:\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "support.constant.math.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.accessor.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.accessor.optional.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "support.function.math.js"
|
||||
},
|
||||
"5": {
|
||||
"name": "support.constant.property.math.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(JSON)(?:\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(parse|stringify))?\\b(?!\\$)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "support.constant.json.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.accessor.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.accessor.optional.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "support.function.json.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
|
||||
"captures": {
|
||||
|
||||
@@ -3566,59 +3566,10 @@
|
||||
"name": "variable.language.arguments.js.jsx",
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.class.builtin.js.jsx",
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array\n |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.class.error.js.jsx",
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.class.promise.js.jsx",
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"name": "support.function.js.jsx",
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Math)(?:\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "support.constant.math.js.jsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.accessor.js.jsx"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.accessor.optional.js.jsx"
|
||||
},
|
||||
"4": {
|
||||
"name": "support.function.math.js.jsx"
|
||||
},
|
||||
"5": {
|
||||
"name": "support.constant.property.math.js.jsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(JSON)(?:\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(parse|stringify))?\\b(?!\\$)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "support.constant.json.js.jsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.accessor.js.jsx"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.accessor.optional.js.jsx"
|
||||
},
|
||||
"4": {
|
||||
"name": "support.function.json.js.jsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
|
||||
"captures": {
|
||||
|
||||
Reference in New Issue
Block a user