diff --git a/files/.config/nvim/mappings.vim b/files/.config/nvim/mappings.vim index 22319a2..cfcc97d 100644 --- a/files/.config/nvim/mappings.vim +++ b/files/.config/nvim/mappings.vim @@ -87,8 +87,8 @@ nmap E :CocCommand explorer --reveal expand('') " coc.nvim -" Ctrl-n - Go to previous diagnostic -" Ctrl-p - Go to next diagnostic +" Ctrl-n - Go to next diagnostic +" Ctrl-p - Go to previous diagnostic " c - Open command list " d - Jump to definition of current symbol " r - Jump to references of current symbol @@ -96,8 +96,8 @@ nmap E :CocCommand explorer --reveal expand('') " s - Fuzzy search current project symbols " n - Symbol renaming " k - Symbol renaming -nmap (coc-diagnostic-prev) -nmap (coc-diagnostic-next) +nmap (coc-diagnostic-next) +nmap (coc-diagnostic-prev) nmap d (coc-definition) nmap r (coc-references) nmap j (coc-implementation) @@ -112,26 +112,23 @@ nnoremap h :%s/// nnoremap / :nohlsearch -" use for trigger completion and navigate to next complete item +" - trigger completion +" - trigger completion and navigate to next complete item +inoremap coc#refresh() 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() -else - inoremap coc#refresh() -endif - -" Use K to show documentation in preview window. +" K - show documentation in preview window nnoremap K :call show_documentation() function! s:show_documentation() diff --git a/files/.config/nvim/plugins.vim b/files/.config/nvim/plugins.vim index dabbae8..8e2b537 100644 --- a/files/.config/nvim/plugins.vim +++ b/files/.config/nvim/plugins.vim @@ -66,7 +66,7 @@ Plug 'junegunn/goyo.vim' Plug 'junegunn/limelight.vim' " DOcumentation GEneraton -Plug 'kkoomen/vim-doge' +Plug 'kkoomen/vim-doge', { 'do': { -> doge#install({ 'headless': 1 }) } } " auto-close plugins Plug 'tpope/vim-endwise'