vscode-clangd
vscode-clangd copied to clipboard
Semantic highlighting is missing some tokens
See in screenshot
Syntax highlighting colors are not consistent. (Comparing A
, int
, decltype
)
I checked in "Developer: Inspect Editor Token and Scopes", and notice not all types have "semantic token type"
System information
Clangd version (from the log, or clangd --version
): 15.0.0
clangd extension version: 0.1.16
Operating system: x86_64-pc-linux-gnu ubuntu 20.04 in WSL2
Not having semantic tokens for primitive types is deliberate; since those are keywords, we generally expect them to be covered by client-side highlighting (though there is discussion in https://github.com/clangd/clangd/issues/1115 about supporting an option to have the server provide all tokens so there is no need for client-side highlighting).
However, the semantic tokens on the two decltype
occurrences in the screenshot are unexpected; I would only expect decltype
to get a semantic token if the deduced type is not primitive.