39 lines
1.1 KiB
VimL
39 lines
1.1 KiB
VimL
" Smaller updatetime for CursorHold & CursorHoldI
|
|
set updatetime=300
|
|
|
|
" don't give |ins-completion-menu| messages.
|
|
set shortmess+=c
|
|
|
|
" always show signcolumns
|
|
set signcolumn=yes
|
|
|
|
" Some server have issues with backup files, see coc#649
|
|
set nobackup
|
|
set nowritebackup
|
|
|
|
" Better display for messages
|
|
set cmdheight=2
|
|
|
|
" Use <c-space> for trigger completion.
|
|
inoremap <silent><expr> <c-space> coc#refresh()
|
|
|
|
" Use <cr> for confirm completion, `<C-g>u` means break undo chain at current
|
|
" position. Coc only does snippet and additional edit on confirm.
|
|
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
|
|
|
" Use `[c` and `]c` for navigate diagnostics
|
|
nmap <silent> [c <Plug>(coc-diagnostic-prev)
|
|
nmap <silent> ]c <Plug>(coc-diagnostic-next)
|
|
|
|
" Remap keys for gotos
|
|
nmap <silent> gd <Plug>(coc-definition)
|
|
nmap <silent> gt <Plug>(coc-type-definition)
|
|
nmap <silent> gi <Plug>(coc-implementation)
|
|
nmap <silent> gr <Plug>(coc-references)
|
|
|
|
" Remap for do code action of current line
|
|
nmap <localleader>a <Plug>(coc-codeaction)
|
|
|
|
" Remap for rename current word
|
|
nmap <localleader>n <Plug>(coc-rename)
|
|
|