Highlight some #if XXX
... #endif
to comment
#1817
-
Is it possible to highlight the following code to comment? #if 0
XXX
#endif Moreover, if #ifundef FOO
XXX
#endif |
Beta Was this translation helpful? Give feedback.
Answered by
HighCommander4
Nov 12, 2023
Replies: 2 comments 2 replies
-
And the following int main() {
return EXIT_SUCCESS;
XXX
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
What clangd version are you using, and what client? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clangd 14 produces
comment
semantic tokens for inactive preprocessor branches.The appearance for a particular kind of semantic token is configured on the client side. I'm not sure how to configure it for coc-clangd, you can ask about this at https://github.com/clangd/coc-clangd/issues. Note that https://github.com/clangd/coc-clangd#configurations suggests that semantic highlighting in general needs to be enabled using
semanticTokens.enable
.