You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Difference in behavior with encodedSemanticClassifications-full in TS 4.1 compared to using VS Code plugin #41262
Thanks Orta Therox (@orta). Just tested this on 4.2.0-dev.20201201 and still seeing issues (although I'm not 100% that the changes have been picked up):
SemanticDiagnosticsSyncRequestArgs Does not include a format argument in the protocol typings
SemanticDiagnosticsSyncRequestArgs does not seem to take a range for the file. In encodedSemanticClassifications-full, we currently do pass a range
Even if I try force add format: '2020' to the request, I still don't see the more complete results returned
I actually was using the wrong types in my earlier comments. SemanticDiagnostics is not what we want. Instead it looks like SemanticClassifications types are missing from the protocol
Activity
orta commentedon Nov 4, 2020
Ah yeah, I made it default to the old behavior so that VS wasn't forced to make changes!
The API for
getSemanticClassificationsin the language service now has an optional third param which is a 'format':Which you can put "2020":
To trigger the new formatter, I expect that's just an extra param somewhere on the vscode side?
mjbvz commentedon Nov 20, 2020
Thanks Orta Therox (@orta). I gave this a try but can't get it working. The problems I ran into:
I'm not sure how I can pass the
formatparameter to the server. I tried adding it to the request but that doesn't seem to workI don't see the new semantic request types in the server's
protocol.d.tsorta commentedon Nov 24, 2020
I've sent a PR updating the 4.0 branch with the param, will just d the same thing for the master branch now
mjbvz commentedon Dec 2, 2020
Thanks Orta Therox (@orta). Just tested this on
4.2.0-dev.20201201and still seeing issues (although I'm not 100% that the changes have been picked up):SemanticDiagnosticsSyncRequestArgsDoes not include aformatargument in the protocol typingsSemanticDiagnosticsSyncRequestArgsdoes not seem to take a range for the file. InencodedSemanticClassifications-full, we currently do pass a rangeEven if I try force add
format: '2020'to the request, I still don't see the more complete results returnedorta commentedon Dec 2, 2020
Do you have a WIP vscode branch? I can try get that up and running and work out the kinks?
mjbvz commentedon Dec 5, 2020
Orta Therox (@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.
SemanticDiagnosticsis not what we want. Instead it looks likeSemanticClassificationstypes are missing from the protocol