42 lines
1.1 KiB
VimL
42 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 `[g` and `]g` for navigate diagnostics
|
|
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
|
nmap <silent> ]g <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 <leader>la <Plug>(coc-codeaction)
|
|
|
|
" Remap for rename current word
|
|
nmap <leader>ln <Plug>(coc-rename)
|
|
|
|
" Remap for do action format
|
|
nnoremap <silent> F :call CocAction('format')<CR>
|
|
|