Closed entropitor closed 3 years ago
Could you provide a log of the server responses? Setting LanguageClient_loggingLevel
to DEBUG
should given enough info. Also, a minimal reproducible example would help a lot (including .vimrc please).
And I'm not sure if it will have anything at that point, but if you could paste the output of :echo v:completed_item
that'd be great!
If you feel like trying something out though, I think you won't have this issue in the dev branch, which has unreleased changes. As that branch has a commit that basically disables the autocmds for filetypes that you don't have a configured server for, so handleCompleteDone would be called only for fsharp. If you want to try that out you'll have to build from source though.
Right now, I'm only installing this plugin for fsharp (using vim-plug for
argument) and then doing the following to disable the CompleteDone
autocmd BufEnter *.fs,*.fsx,*.fsi autocmd! languageClient CompleteDone
It works for me but it's a bit annoying
This is :echo v:completed_item
{'word': 'string', 'menu': 'Microsoft.FSharp.Core.Operators.string', 'user_data': {'lsp': {'complet
ion_item': {'label': 'string', 'commitCharacters': [], 'data': {'FullName': 'Microsoft.FSharp.Core.
Operators.string'}, 'additionalTextEdits': [], 'insertText': 'string', 'kind': 2, 'detail': 'Micros
oft.FSharp.Core.Operators.string'}}}, 'info': ' ', 'kind': 'Method', 'abbr': 'string'}
Yeah I think this shouldn't be a problem for you in the dev
branch. If you are happy to try that out it would be great. Otherwise, your fix seems like a reasonable approach until we cut the next release.
I'm actually a little surprised about the v:completed_item
you get. The docs say this
All of these except "icase", "equal", "dup" and "empty" must be a string. If
an item does not meet these requirements then an error message is given and
further items in the list are not used. You can mix string and Dictionary
items in the returned list.
So theoretically user_data
should be a string, not a dictionary. If it was a string, this wouldn't be a problem for you. So maybe it's worth opening an issue in completion-nvim. I'll see to do that later today.
Ok, turns out that that documentation is outdated, user_data
can now be anything. I just merged a slightly related PR and included a fix for this. So it should work just fine for you in the dev
branch now.
Seems to work indeed!
bin/languageclient --version
to get its version number.:checkhealth LanguageClient
? YESDescribe the bug
I get the following error when completing an item using Neovim 0.5 builtin LSP and completion-nvim. I still need to install this plugin for https://github.com/ionide/Ionide-vim but that's only for fsharp. I don't want to break my setup for other languages
It would be nice if this could be disabled.
Environment
nvim --version
orvim --version
): neovim 0.5 HEADgit rev-parse --short HEAD
): d6d6d08