Closed amandeepgautam closed 4 years ago
This is neither a bug or related to vim-lsp-cxx-highlight.
clangd (and ccls) only can send highlighting information after obtaining the AST for the file which naturally involves "compiling" and analyzing it with libclang. Given the complexity of C++ syntax its natural the process takes awhile if there's a significant amount of code to go through. For perspective, I use ccls and this plugin to work on a code base that takes over an hour to fully index on a fairly powerful workstation.
If you close your vim frequently then you should be saving the index to disk for faster reloading. ccls by default will do this for all versions but only recent versions of clangd have indexing support (I think version 10+) and may need to be configured by the user. As this isn't the place for clangd support please find the appropriate channel if you can't figure it out. I recommend upgrading the version and looking at the docs first.
Hi have vim-lsp-cxx-highlight setup with coc-clangd and coc.nvim.
For files in a large project, I do not see the highlighting until clangd becomes idle. This can take up to a minute. It is not a problem for coc.nvim as it still shows incomplete auto-completion list. However, for highlighting purposes, it feels like too much of a lag.