jackguo380 / vim-lsp-cxx-highlight

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

Incompatible with neovim since PR13945 #53

Closed CompyENG closed 3 years ago

CompyENG commented 3 years ago

Describe the bug When starting a version of neovim with a verison that includes https://github.com/neovim/neovim/pull/13945 the error "vim-lsp-cxx-highlight cannot find a LSP client" appears. That PR changed "callbacks" to "handlers" inside vim.lsp

To Reproduce Steps to reproduce the behavior: Run trunk neovim with the plugin installed

Expected behavior No error.

Screenshots If applicable, add screenshots to help explain your problem.

Configuration (Fill this out):

Log File:

Sun 28 Feb 2021 09:03:57 AM CST: lsp_cxx_hl beginning initialization...
Sun 28 Feb 2021 09:03:57 AM CST: vim-lsp not detected
Sun 28 Feb 2021 09:03:57 AM CST: LanguageClient-neovim not detected
Sun 28 Feb 2021 09:03:57 AM CST: coc.nvim not detected
Sun 28 Feb 2021 09:03:57 AM CST: nvim-lsp failed to register: Vim(lua):E5108: Error executing lua [string ":lua"]:3: attempt to index field 'callbacks' (a nil value)
Sun 28 Feb 2021 09:03:57 AM CST: Failed to find a compatible LSP client
csaez commented 3 years ago

Thanks for reporting this, I found the same issue after updating my setup today :) Renaming the calls to callbacks as handlers, as @TrueJournals mentioned, seems to fix the issue for me.

i.e. https://github.com/jackguo380/vim-lsp-cxx-highlight/blob/7c47d39d808118f0ef030b15db28ff3995d91cb6/autoload/lsp_cxx_hl/client/nvim_lsp.vim#L18-L32