coc-clangd: semanticHighlighting not working anymore

I always had semanticHighlighting enabled with jackguo380/vim-lsp-cxx-highlight and everything was highlighted as intended. Today i updated Coc and all my plugins and i noticed that the highlighting didn’t work as intended (only basic keywords are colored like if or int).

System information Clangd version (from the log, or clangd --version): 12.0.0 clangd extension version: 0.11.0 Operating system: Arch Linux

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 25 (7 by maintainers)

Most upvoted comments

Yes, disable semanticTokensHighlights doesn’t fix this. This need to disable semanticTokens feature in client, I’m working on this.

Thank you for your feedback, will look into this issue.

Basic hi groups have been added in coc, please give it a try.

You can stick to coc.nvim v0.0.80 as a workaround @GiuseppeCesarano .

Set coc.preferences.semanticTokensHighlights to false to disable the new semanticTokens highlighting, to use the old highlighting protocol.

@ssh352,

init.vim:

let g:coc_default_semantic_highlight_groups = 1

coc-settings.json:

"semanticTokens.filetypes": ["*"],

I’m using NVIM 0.5.0 with treesitter for syntax highlighting and I fixed the issue by setting

"coc.preferences.semanticTokensHighlights": false 

in coc-settings.json.