File tree 2 files changed +23
-1
lines changed
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change
1
+ set updatetime = 100
2
+ " GoTo code navigation.
3
+ nmap <silent> gd <Plug> (coc-definition)
4
+ nmap <silent> gy <Plug> (coc-type-definition)
5
+ nmap <silent> gi <Plug> (coc-implementation)
6
+ nmap <silent> gr <Plug> (coc-references)
7
+
8
+ " Use K to show documentation in preview window.
9
+ nnoremap <silent> K :call <SID> show_documentation()<CR>
10
+
11
+ function ! s: show_documentation ()
12
+ if (index ([' vim' ,' help' ], &filetype ) >= 0 )
13
+ execute ' h ' .expand (' <cword>' )
14
+ else
15
+ call CocActionAsync (' doHover' )
16
+ endif
17
+ endfunction
18
+
19
+ " Highlight the symbol and its references when holding the cursor.
20
+ autocmd CursorHold * silent call CocActionAsync (' highlight' )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Plug 'SirVer/ultisnips'
6
6
Plug ' honza/vim-snippets'
7
7
Plug ' junegunn/fzf' , { ' do' : { - > fzf#install () } }
8
8
Plug ' junegunn/fzf.vim'
9
- " Plug 'neoclide/coc.nvim', {'branch': 'release'}
9
+ Plug ' neoclide/coc.nvim' , {' branch' : ' release' }
10
10
Plug ' itchyny/lightline.vim'
11
11
Plug ' mengelbrecht/lightline-bufferline'
12
12
Plug ' lifepillar/vim-gruvbox8'
@@ -88,3 +88,5 @@ let g:lightline = {
88
88
\ ' buffers' : ' tabsel'
89
89
\ }
90
90
\}
91
+
92
+ source ~/.config/nvim/coc.vim
You can’t perform that action at this time.
0 commit comments