Closed DvdBr3o closed 2 weeks ago
I encountered a similar problem when I switched my LSP from the VS Code C/C++ to clangd.
The class name Widget wasn't highlight properly .
I checked token by Scope inspector : Developer: Inspect Editor Tokens and Scopes
.
It revealed that the class name 'Widget' and the object 'widget' were both mistakenly classified as 'source' and lacked semantic tokens, which is why they appeared in white. However, the hover feature correctly identifies the type of 'Widget', indicating that clangd's semantic tokenization is functioning correctly, but the semantic highlighting is not.
Reference to Enablement of semantic highlighting, I adjusted editor.semanticHighlighting.enabled
from configuredByTheme
to true
, This resolved the issue, and now the semantic tokens are displayed correctly as well ^_^
Hope this may help ^_^
@Jas0nG it works! :)
This is a piece of c++ code.
The color of
std::wstring
should have been rendered as white forstd
, blue forwstring
.However, it was rendered green for
std
, white forwstring
.The correct render result should have been the one presented in the hover.
I'm not sure whether this is something to do with monokai pro, since I've tried other themes as well, some of which performs right while some don't.
This is only one instance, something like blue for macros being rendered as white could also be seen below:
GLFW_TRANSPARENT_FRAMEBUFFER
,GLFW_TRUE
,GLFW_DECORATED
in this case.The LSP is clangd.
I could quite assure that when i prevoiusly use monokai pro, they performed correctly. While somehow they don't now. :(