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

nvim-lsp broke handler interface #75

Closed Eyenseo closed 2 years ago

Eyenseo commented 2 years ago

Describe the bug This plugin breaks in all interesting ways after neovim/neovim/pull/15504

To Reproduce Open a c/c++ project and notice funky errors of this problem (eg. not finding the 'uri' key in a dict)

Expected behavior No errors.

Configuration (Fill this out):

Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim/src/neovim-0.5.1/build/config -I/build/neovim/src/neovim-0.5.1/src -I/usr/include -I/build/neovim/src/neovim-0.5.1/build/src/nvim/auto -I/build/neovim/src/neovim-0.5.1/build/include
Compiled by builduser

Features: +acl +iconv +tui
call plug#begin('~/.local/share/vim-plug')
    Plug 'jackguo380/vim-lsp-cxx-highlight'
    Plug 'neovim/nvim-lspconfig'
call plug#end()

 let g:lsp_cxx_hl_verbose_log = 1
 let g:lsp_cxx_hl_log_file = '/tmp/vim-lsp-cxx-hl.log'

lua <<EOF

  -- Setup lspconfig.
  require('lspconfig').ccls.setup {
    init_options = {
      highlight = {
        lsRanges = true;
      }
    }
  }
EOF

Log File: Not viable.

Additional context I checked what was passed to handlers['$ccls/publishSemanticHighlight'] = function(err, method, params, client_id) and indeed method now contained the information that was previously in params which is result after neovim/neovim/pull/15504