Skip to content

Commit 40077f5

Browse files
committed
[typescript][semantic] add library modifier. Fixes microsoft#91090
1 parent e68ccf2 commit 40077f5

6 files changed

Lines changed: 20 additions & 8 deletions

File tree

extensions/theme-red/themes/Red-color-theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
},
193193
{
194194
"name": "Support.constant",
195-
"scope": "support.constant",
195+
"scope": [ "support.constant", "support.variable"],
196196
"settings": {
197197
"fontStyle": "",
198198
"foreground": "#eb939aff"

extensions/theme-solarized-light/themes/solarized-light-color-theme.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@
182182
},
183183
{
184184
"name": "Library constant",
185-
"scope": "support.constant",
185+
"scope": [
186+
"support.constant",
187+
"support.variable"
188+
],
186189
"settings": {}
187190
},
188191
{

extensions/typescript-language-features/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"jsonc-parser": "^2.2.1",
2020
"rimraf": "^2.6.3",
2121
"semver": "5.5.1",
22-
"typescript-vscode-sh-plugin": "^0.6.10",
22+
"typescript-vscode-sh-plugin": "^0.6.11",
2323
"vscode-extension-telemetry": "0.1.1",
2424
"vscode-nls": "^4.1.1"
2525
},

extensions/typescript-language-features/src/features/semanticTokens.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ tokenModifiers[TokenModifier.declaration] = 'declaration';
151151
tokenModifiers[TokenModifier.readonly] = 'readonly';
152152
tokenModifiers[TokenModifier.static] = 'static';
153153
tokenModifiers[TokenModifier.local] = 'local';
154+
tokenModifiers[TokenModifier.defaultLibrary] = 'defaultLibrary';
154155

155156
// make sure token types and modifiers are complete
156157
if (tokenTypes.filter(t => !!t).length !== TokenType._) {

extensions/typescript-language-features/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,10 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
626626
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
627627
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
628628

629-
typescript-vscode-sh-plugin@^0.6.10:
630-
version "0.6.10"
631-
resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.6.10.tgz#f9fdac506a3adb698d52fd01723ec78e8a5fc09e"
632-
integrity sha512-cYycpwLnYT2oS48tac+UvVRtIFHHTcHAz/g3N2HpYftuMEBvBcsGfe2SrlnrGCa1gMheTbo+twIHhsQu9ygdvg==
629+
typescript-vscode-sh-plugin@^0.6.11:
630+
version "0.6.11"
631+
resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.6.11.tgz#638fcc28ea5fad044b316d4305fe0925251ddf78"
632+
integrity sha512-b3hVytj/EMFd2TgkF16l5NXEOQBRJ79e3k5+NWF8bxElLP6JsNEv/aXMFgNK07p8WcVkeE9PXC9YoURj2LWDpg==
633633

634634
uri-js@^4.2.2:
635635
version "4.2.2"

src/vs/platform/theme/common/tokenClassificationRegistry.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,15 @@ function createDefaultTokenClassificationRegistry(): TokenClassificationRegistry
533533

534534
registerTokenStyleDefault('variable.readonly', [['variable.other.constant']]);
535535
registerTokenStyleDefault('property.readonly', [['variable.other.constant.property']]);
536-
536+
registerTokenStyleDefault('type.defaultLibrary', [['support.type']]);
537+
registerTokenStyleDefault('class.defaultLibrary', [['support.class']]);
538+
registerTokenStyleDefault('interface.defaultLibrary', [['support.class']]);
539+
registerTokenStyleDefault('variable.defaultLibrary', [['support.variable'], ['support.other.variable']]);
540+
registerTokenStyleDefault('variable.defaultLibrary.readonly', [['support.constant']]);
541+
registerTokenStyleDefault('property.defaultLibrary', [['support.variable.property']]);
542+
registerTokenStyleDefault('property.defaultLibrary.readonly', [['support.constant.property']]);
543+
registerTokenStyleDefault('function.defaultLibrary', [['support.function']]);
544+
registerTokenStyleDefault('member.defaultLibrary', [['support.function']]);
537545
return registry;
538546
}
539547

0 commit comments

Comments
 (0)