No asyncomplete's auto_popup, do only on demand
authorSergey Matveev <stargrave@stargrave.org>
Sat, 11 Jul 2020 13:53:00 +0000 (16:53 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 11 Jul 2020 13:53:00 +0000 (16:53 +0300)
vim/.vim/plugin/lsp.vim
vim/.vimrc

index 1348fc4dbc4a7d040f2bd824ac5feb140afd4561..13d51d5aeb8bad48e54c8a58e30a43d85e0892a8 100644 (file)
@@ -1,15 +1,18 @@
+let g:lsp_settings_enable_suggestions = 0
 let g:lsp_settings = {
 \  'clangd': {'cmd': ['clangd60']},
 \}
 
 let g:asyncomplete_auto_completeopt = 0
-let g:lsp_settings_enable_suggestions = 0
+let g:asyncomplete_auto_popup = 0
+imap <C-@> <Plug>(asyncomplete_force_refresh)
+autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
+
 let g:lsp_highlight_references_enabled = 1
 let g:lsp_diagnostics_echo_cursor = 1
+let g:lsp_diagnostics_echo_delay = -1
 
 function! s:on_lsp_buffer_enabled() abort
-    setlocal completeopt=menuone,noinsert,noselect
-    setlocal omnifunc=lsp#complete
     nmap <buffer> [g <Plug>(lsp-previous-diagnostic)
     nmap <buffer> ]g <Plug>(lsp-next-diagnostic)
     nmap <buffer> gd <plug>(lsp-definition)
index ab10103833a82475e7471909ffd379c2593ea820..d44abc32fc2118d9092ba9b4a1c1f59373b6c862 100644 (file)
@@ -33,6 +33,7 @@ set showcmd
 set showmatch
 set listchars=trail:·,tab:>→,nbsp:% ",eol:¶
 set list
+set completeopt-=preview
 
 set cursorline
 set cursorcolumn