-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deoplete + ccls autocomplete to garbage #812
Comments
I have tested old ccls, it works properly. |
Reproduced with |
It is not deoplete problem. Candidates word is broken in LanguageClient source. |
Is the candidate word list different from the list displayed in the popup? The contents of the popup itself are correct, as seen in the screenshot. It is strange that it works properly with older versions of ccls. I doubt that ccls sends two lists: a proper one for the popup and a broken list for completion. Maybe @MaskRay could reproduce it. It's possible that LanguageClient-neovim corrupts the stuff it receives. I've peeked into the logs on DEBUG but couldn't find anything suspicious. |
A completion item looks like: {
"label": "doNothing() -> void",
"kind": 2,
"detail": "Foo",
"sortText": " !",
"filterTet": "->doNothing", /// it has to include -> to work around a VSCode issue
"insertTextFormat": 1,
"textEdit": {
"range": {
"start": {
"line": 17,
"character": 5
},
"end": {
"line": 17,
"character": 7
}
},
"newText": "->doNothing()"
}
} |
I don't think the |
Using clangd with the same deoplete and LanguageClient-neovim does not have this problem: let g:LanguageClient_serverCommands = { 'cpp': [ 'clangd' ] } CCLS still completes to broken results. I just tried it using the latest ccls, deoplete and LanguageClient-neovim from today:
|
This problem does not occur anymore using the latest ccls, LanguageClient-neovim and deoplete.vim. Now there is a new problem, which causes the completion to insert full function signatures instead of just the function name. E.g. |
This issue is back with 0.1.155. You can use the same code I've posted above in the initial example to reproduce the bug. Note: You have to download 0.1.155 manually to This time Output of
Output of
I'm using the latest deoplete, freshly cloned from master at the time of writing. |
I doubt this issue is a problem with ccls or deoplete. I've tried all other LSP plugins, some of which also rely on deoplete and ccls. They don't have this particular issue, but are unfortunately broken in their own ways. I hope one day we will have working and reliable LSP support in Neovim. Note: For those who who came here sharing the same dissatisfaction with the state of LSP plugins, I can only recommend you to configure YouCompleteMe to act as an LSP client for ccls. It works pretty good. You just have to rebuild YCM without its own clang-based semantic features and configure |
It has been a while since I tried LanguageClient-neovim, but I think this may be a duplicate of #662 The root cause is that a new completion mechanism is not supported in LanguageClient-neovim, or the snippet engine it uses. clangd still supports I don't know the state of snippet support in the neovim ecosystem. ccls supports 3 different completion styles (https://github.com/MaskRay/ccls/wiki/Customization)
|
So far as I know,
Perhaps it's time to make prefer-text-edit the client default; then so far as I can see both this and #662 can be closed. Edit: one caveat on this is that I use NCM2 and not deoplete. So it may be that the deoplete integration is not correct, I wouldn't know about that. |
I'll close this one as it seems stale and it has been fixed (at least for NCM2) but feel free to re-open if anyone is still experiences this issue. |
Describe the bug
Members of certain classes/structs autocomplete to garbage. See Current Behaviour for more details.
Environment
nvim --version
orvim --version
):git rev-parse --short HEAD
):6ee4c89
bin/languageclient --version
):languageclient 0.1.146
reproduce the issue. Refer to an example here):
See "To Reproduce" below
To Reproduce
Create a minimal nvim runtime with
plug.vim
, the latestccls
,deoplete.vim
andLanguageClient-neovim
:Copy this to
/tmp/vim-runtime/init.vim
:Copy this to
/tmp/vim-runtime/example.cpp
:Install all plugins and (re)start nvim with the example.cpp file:
Current behavior
Members like
doNothing
get completed tohing()
.Expected behavior
Members like
doNothing
get completed todoNothing
, without the parenthesis. There is an option in deoplete to disable parenthesis completion, but it seems to have no effect.CCLS works, the contents of the pop-up are correct. It may be a deoplete problem, but I couldn't reproduce it in isolation without the other components. Maybe @Shougo could.
The text was updated successfully, but these errors were encountered: