jackguo380 / vim-lsp-cxx-highlight

Vim plugin for C/C++/ObjC semantic highlighting using cquery, ccls, or clangd
MIT License
337 stars 26 forks source link

Highlight only updates after saving file (Neovim, ccls, Windows) #80

Closed gabrieldechichi closed 2 years ago

gabrieldechichi commented 2 years ago

I'm using vim-lsp-css-highlight with Neovim + ccls + coc and highlight only updates after writing to the buffer.

I did see this highlight issue which said the problem was resolved, but it still happens for me with minimum config.

OS: Windows 11 nvim v0.5.1 vim-lsp-css-highlight - main coc-vim - release ccls version 0.20210330-0-g0ada56ef clang version 11.0.1

init.vim (minimal):

" vim-plug: {{{
call plug#begin('~/.vim/plugged')
Plug 'jackguo380/vim-lsp-cxx-highlight'
Plug 'neoclide/coc.nvim', {'branch': 'release'}

call plug#end()
" }}}

" Settings: {{{
filetype indent plugin on
scriptencoding utf-8

Repro steps:

https://user-images.githubusercontent.com/15620434/142736332-34421828-76da-4d72-a28b-60ae1e6cf837.mp4

jackguo380 commented 2 years ago

This is expected, the main complaint back in #4 was the fact that highlighting was corrupted after adding/deleting lines. That should no longer be the case for neovim or newer vim as this plugin uses highlighting APIs that move with the text.

ccls doesn't update highlighting until the file is saved. I consider this a feature not a bug, some users of the clangd integration have complained about highlight updating too frequently.