Closed Leo843 closed 4 years ago
Hi, could you please provide a screenshot as well as some sample code + instructions to reproduce (e.g. delete line 5 then add text to line 8).
I thought this was already fixed on the coc-clangd side.
I have edited the post with instructions to reproduce the error.
Great thanks. I do see the issue when using clangd 9, however I was not able to reproduce it with clangd 10. I'm not too willing to look further into this since it seems like there's some behavior from clangd 9 thats not handled by coc-clangd or vim-lsp-cxx-highlight which was fixed in clangd 10. I'm a little worried it could break clangd 10 or later if I add a workaround, newer versions take priority.
Could you try upgrading your clangd to version 10 and see if the problem is fixed?
I don't know what platform you are on but usually https://releases.llvm.org/download.html has binaries for most of them. If you are running debian based linux they have an apt repository as well at https://apt.llvm.org/.
The problem no longer appears with clang 10.
Thx!
Describe the bug When editing a file, as lines get inserted and removed, some lines are displayed with the colors of adjacent lines. Saving the file
:w
or refreshing the buffer:e
do not correct the colors. I have to restart the language server:CocRestart
to get back the right colors.To Reproduce
1) Setup a working directory with the 2 following files:
${working-dir}/main.cpp
${working-dir}/.vim/coc-settings.json
2) Open main.cpp with vim
3) Insert a new line before the main function
4) Remove a line before the main function
The
return
keyword get the color of theputs
function.Expected behavior All lines keep the correct syntax highlight even while editing the file.
Configuration: vim: 8.2.1543 clangd: 9.0.0 coc: latest release vim-lsp-cxx-highlight: master
The following flag is set in my vimrc: