Strange behaviour with vim-lsp+clangd+asyncomplete-lsp
blegouix opened this issue · 1 comments
blegouix commented
Hello,
Here is my .vimrc:
call plug#begin()
Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'piec/vim-lsp-clangd'
call plug#end()
:set tabstop=4 smarttab
:set shiftwidth=2
:set autoindent
:set smartindent
let g:lsp_document_highlight_enabled = 1
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<C-n>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
Very simple but when I want to use autocompletion, I don't get the expected behavior.
Lets say:
- I start to write
temp
, - The keyword
template
is proposed in the popup (clangd is well recognized here, I get C++ completion not general one like on fresh Vim install), - But if I do Tab+Enter I get something like:
temptemplate
So the few characters I wrote before using autocompletion remains.
Do I miss something ?
(https://vi.stackexchange.com/questions/42011/strange-behaviour-with-vim-lspclangdasyncomplete-lsp)
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.