Skip to content

Commit

Permalink
Stop double insertion of #include in clangd
Browse files Browse the repository at this point in the history
LSP client
If `completionTextEdit` is set in LSP client (https://github.com/yegappan/lsp),
it applies LSP supplied text changes twice -- once, when completion candidate
is accepted and second time after `CompleteDone` event is fired. This seems
like a LSP client bug.

Solution: Set completionTextEdit to `false` in LSP client config.

#72
#37
M  autoload/vimcomplete/lsp.vim
  • Loading branch information
girishji committed Aug 6, 2024
1 parent 113d288 commit 04795b3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion autoload/vimcomplete/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export def Setup()
if exists('*g:LspOptionsSet')
var lspOpts = {
useBufferCompletion: false,
completionTextEdit: true, # https://github.com/girishji/vimcomplete/issues/37
snippetSupport: true, # snippets from lsp server
vsnipSupport: false,
autoComplete: false,
Expand Down

0 comments on commit 04795b3

Please sign in to comment.