Closed
Description
TypeScript Version: 4.1.0-dev.20201026
Repro
-
Using TS
4.1.0-dev.20201026
and a build of VS Code that explicitly disables thetypescript-vscode-sh-plugin
pluginHere's the change in the VS Code repo that disables the plugin:
diff --git a/extensions/typescript-language-features/package.json b/extensions/typescript-language-features/package.json index dfd3f6295a..aa3763aaf7 100644 --- a/extensions/typescript-language-features/package.json +++ b/extensions/typescript-language-features/package.json @@ -1114,12 +1114,6 @@ } ] } - ], - "typescriptServerPlugins": [ - { - "name": "typescript-vscode-sh-plugin", - "enableForWorkspaceTypeScriptVersions": true - } ] } }
-
Use the TS File:
class Foo {} const a = Foo; console.log(a);
-
Look at semantic highlighting
Bug
With TS 4.1 and the plugin disabled, I see this response:
[Trace - 00:50:46.802] <semantic> Response received: encodedSemanticClassifications-full (17). Request took 1673 ms. Success: true
Result: {
"spans": [
6,
3,
11,
24,
3,
11
],
"endOfLineState": 0
}
With the plugin enabled, I see:
[Trace - 00:50:59.813] <semantic> Response received: encodedSemanticClassifications-full (16). Request took 980 ms. Success: true
Result: {
"spans": [
6,
3,
257,
20,
1,
257,
24,
3,
256,
30,
7,
2064,
38,
3,
3088,
42,
1,
256
],
"endOfLineState": 0
}
As you can see, the plugin seems to be providing a lot more information
@orta Is there any work we need to do on the VS Code side to adopt the new semantic work in TS 4.1?
/cc @aeschli