add more settings to coc
This commit is contained in:
parent
477fd09d74
commit
6876de02c9
1 changed files with 28 additions and 2 deletions
30
init.vim
30
init.vim
|
@ -67,8 +67,6 @@ if has('nvim-0.4.0') || has('patch-8.2.0750')
|
|||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
endif
|
||||
|
||||
" Run the Code Lens action on the current line.
|
||||
nmap <leader>cl <Plug>(coc-codelens-action)
|
||||
|
||||
" Find files using Telescope command-line sugar.
|
||||
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
||||
|
@ -76,6 +74,34 @@ nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
|||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
|
||||
" config for coc#pum#visible
|
||||
|
||||
" Some servers have issues with backup files, see #649.
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
|
||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||
" delays and poor user experience.
|
||||
set updatetime=300
|
||||
|
||||
" Always show the signcolumn, otherwise it would shift the text each time
|
||||
" diagnostics appear/become resolved.
|
||||
set signcolumn=yes
|
||||
|
||||
|
||||
" Symbol renaming.
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Formatting selected code.
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
" GoTo code navigation.
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: There's always complete item selected by default, you may want to enable
|
||||
" no select by `"suggest.noselect": true` in your configuration file.
|
||||
|
|
Loading…
Reference in a new issue