hrsh7th / cmp-nvim-lsp

nvim-cmp source for neovim builtin LSP client
MIT License
1.29k stars 52 forks source link

gopls lsp not happy with completionList.itemDefaults #45

Closed bwright1558 closed 1 year ago

bwright1558 commented 1 year ago

completionList.itemDefaults appears to have been added in commit 91050df7b3.

This change is causing the following error when using gopls lsp:

Error executing vim.schedule lua callback: ...w/Cellar/neovim/0.8.1/share/nvim/runtime/lua/vim/lsp.lua:1278:
RPC[Error] code_name = ParseError, message = "JSON RPC parse error: json: cannot unmarshal object into Go struct field PCompletionListPCompletion.capabilities.textDocument.completion.completionList.itemDefaults of type []string"
stack traceback:
        [C]: in function 'assert'
        ...w/Cellar/neovim/0.8.1/share/nvim/runtime/lua/vim/lsp.lua:1278: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
bwright1558 commented 1 year ago

Related code in gopls here. I'm not sure if this is a problem with this plugin or if it is a problem with gopls.

bwright1558 commented 1 year ago

Looks like a problem with this plugin's configuration. Here's the lsp protocol specification.

hrsh7th commented 1 year ago

Sorry. Actually, the specified capability is wrong. I've fixed.