From 4914f5df053bb7326234a4c42054440f91dabfa9 Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Tue, 8 Nov 2022 22:26:01 +0100 Subject: [PATCH] VIM: Update Plugins --- vim/config/pluginconfig.vim | 16 ++++++++++++---- vim/config/plugins.vim | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/vim/config/pluginconfig.vim b/vim/config/pluginconfig.vim index b967cac..58732f0 100644 --- a/vim/config/pluginconfig.vim +++ b/vim/config/pluginconfig.vim @@ -101,16 +101,24 @@ set shortmess+=c let g:coc_filetype_map = {'tex': 'latex'} " Use tab for trigger completion with characters ahead and navigate. " Use command ':verbose imap ' to make sure tab is not mapped by other plugin. + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~ '\s' +endfunction + +" Insert when previous text is space, refresh completion if not. inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" + \ coc#pum#visible() ? coc#pum#next(1): + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction + " Use to trigger completion. inoremap coc#refresh() diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index c47a2a4..9547d0b 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -54,7 +54,7 @@ Plug 'ryanoasis/vim-devicons' Plug 'xuhdev/singlecompile' " Autocomplete -Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'neoclide/coc.nvim', {'tag': 'v0.0.82'} Plug 'honza/vim-snippets' " Language Specific stuff (Language Plugins, Linters, etc)