From e1c70497aafb92ccf820dffe883b7711e9c66018 Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Mon, 8 Aug 2022 00:33:10 -0400 Subject: [PATCH 1/2] update for cocnvim update --- .exp-coc-config | 14 -------------- .vimrc.bundles | 1 + config/coc/setting.json | 4 ++++ 3 files changed, 5 insertions(+), 14 deletions(-) create mode 100644 config/coc/setting.json diff --git a/.exp-coc-config b/.exp-coc-config index f0454d5..7424ac4 100644 --- a/.exp-coc-config +++ b/.exp-coc-config @@ -23,20 +23,6 @@ set shortmess+=c " diagnostics appear/become resolved. "set signcolumn=yes -" Use tab for trigger completion with characters ahead and navigate. -" NOTE: Use command ':verbose imap ' to make sure tab is not mapped by -" other plugin before putting this into your config. -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 - " Use to trigger completion. if has('nvim') inoremap coc#refresh() diff --git a/.vimrc.bundles b/.vimrc.bundles index a9e2cd3..aa145a5 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -194,6 +194,7 @@ endif " coc-clangd: c/c++, may need to install clangd seperatly let g:coc_global_extensions = ['coc-pyright', 'coc-rls', 'coc-clangd', 'coc-tsserver', 'coc-html', 'coc-cmake', 'coc-json', 'coc-sh'] + let g:coc_user_config = g:dotfile_path . '/config/coc/setting.json' if filereadable(expand(config_dir . "/.exp-coc-config")) exec "source " . config_dir . "/.exp-coc-config" endif diff --git a/config/coc/setting.json b/config/coc/setting.json new file mode 100644 index 0000000..49a5b69 --- /dev/null +++ b/config/coc/setting.json @@ -0,0 +1,4 @@ +{ + "suggest.noselect": true, + "suggest.enablePreselect": false +} From e2c803431baafc71d09b0318ae5be7f437fa3c3c Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Mon, 8 Aug 2022 17:15:21 -0400 Subject: [PATCH 2/2] update coc config --- .vimrc.bundles | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vimrc.bundles b/.vimrc.bundles index aa145a5..dcfcc3a 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -194,7 +194,10 @@ endif " coc-clangd: c/c++, may need to install clangd seperatly let g:coc_global_extensions = ['coc-pyright', 'coc-rls', 'coc-clangd', 'coc-tsserver', 'coc-html', 'coc-cmake', 'coc-json', 'coc-sh'] - let g:coc_user_config = g:dotfile_path . '/config/coc/setting.json' + let g:coc_user_config = { + \ 'suggest.noselect': v:true, + \ 'suggest.enablePreselect': v:false } + if filereadable(expand(config_dir . "/.exp-coc-config")) exec "source " . config_dir . "/.exp-coc-config" endif