Open Colengms opened 3 years ago
Language ids and TextMate scope suffix are not necessarily identical (e.g. typescript
vs. ts
) so we would need a new mechanism for that mapping (maybe as part of the semanticTokenScopes contribution point)
The hope was that the specific fallback scopes would be good enough to serve language specific TextMate rules which are not too common
I currently don't have a time budget for that, so if this important, please bring it up at the VSCode/C# planning calls.
Hi @aeschli . I have a work-around for the C/C++ Extension which provides separate fallback scopes for each language we support. We can go ahead and ship that. The issue was reported by a theme author, so I would defer to theme authors about relative importance of fixing it in VS Code.
Version: 1.58.0 (user setup) Commit: 2d23c42a936db1c7b3b06f918cde29561cc47cd6 Date: 2021-07-08T06:54:55.083Z Electron: 12.0.13 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Windows_NT x64 10.0.19043
This is based on the following issue reported against the C/C++ Extension: https://github.com/microsoft/vscode-cpptools/issues/7773
Themes can provide colorization specific to a language, using the language ID as a suffix on the TextMate scope. (i.e.
storage.type.cs
orvariable.language.wildcard.java
- examples taken from default themes). However, when VS Code looks up fallback TextMate scopes for semantic tokens, it does not appear to append the language ID to that scope. Providing separate scopes for each language ID supported by the C/C++ Extension (including for all default fallback scopes) in ourpackage.json
, appears to work around the issue (an example in this comment). However, the proper fix would seem to be for VS Code to always append language ID's when looking up semantic token fallback scopes.