-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Difference in behavior with encodedSemanticClassifications-full in TS 4.1 compared to using VS Code plugin #41262
Comments
Ah yeah, I made it default to the old behavior so that VS wasn't forced to make changes! The API for getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; Which you can put "2020": export const enum SemanticClassificationFormat {
Original = "original",
TwentyTwenty = "2020"
} To trigger the new formatter, I expect that's just an extra param somewhere on the vscode side? |
Thanks @orta. I gave this a try but can't get it working. The problems I ran into:
|
I've sent a PR updating the 4.0 branch with the param, will just d the same thing for the master branch now |
Thanks @orta. Just tested this on
|
Do you have a WIP vscode branch? I can try get that up and running and work out the kinks? |
@orta Here's a branch with the changes: https://github.com/microsoft/vscode/tree/dev/mjbvz/semantic-ts. And the relevant change I actually was using the wrong types in my earlier comments. |
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:
Use the TS File:
Look at semantic highlighting
Bug
With TS 4.1 and the plugin disabled, I see this response:
With the plugin enabled, I see:
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
The text was updated successfully, but these errors were encountered: