From b70df52f093ce838d0fbdda25dbba1ead3f6b3b7 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 31 Dec 2019 23:58:12 -0500 Subject: [PATCH] Added autocompletion for coc-python in vim --- .config/nvim/init.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 90873baa..ad9ae4bd 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -111,6 +111,24 @@ set clipboard+=unnamedplus " Update binds when sxhkdrc is updated. autocmd BufWritePost *sxhkdrc !pkill -USR1 sxhkd " coc stuff +set nobackup +set nowritebackup + +" Use tab for trigger completion with characters ahead and navigate. +" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + + + " You will have bad experience for diagnostic messages when it's default 4000. set updatetime=300