-
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
CompletionItem::textEdit support is incorrect #662
Comments
I believe that the specific way in which prefer-text-edits is broken is per my comment in #857 (comment)
|
https://github.com/prabirshrestha/vim-lsp/blob/master/autoload/lsp/omni.vim#L321 is an interesting solution. Instead of undoing the original completion, expand the text edit so that it just removes the unwanted completion. |
I believe this is no longer an issue so I'll close this one, but feel free to re-open if you are still seeing this. |
Describe the bug
When
CompletionItem.textEdit
is present butCompletionItem.insertText
is absent, completion triggered bytriggerCharacter
does not display the completion item correctly.I've set
g:LanguageClient_completionPreferTextEdit
to 1And IMHO
g:LanguageClient_completionPreferTextEdit
should just default to 1 if the server sendsCompletionItem.textEdit
.Environment
nvim --version
orvim --version
): NVIM v0.3.2-649-g512e0caaegit rev-parse --short HEAD
): 13fc7e2bin/languageclient --version
): languageclient 0.1.129To Reproduce
Steps to reproduce the behavior:
let g:LanguageClient_completionPreferTextEdit = 1
std::
Current behavior
newText
is somehow inserted from the line beginning though it does not overwrite existing characters.Expected behavior
newText
should be inserted in the correct position, not from the line beginning.The text was updated successfully, but these errors were encountered: