2022-06-23 10:45:58 +03:00
|
|
|
" 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>"
|
|
|
|
|
2022-06-23 23:03:31 +03:00
|
|
|
" Use `[c` and `]c` for navigate diagnostics
|
|
|
|
nmap <silent> [c <Plug>(coc-diagnostic-prev)
|
|
|
|
nmap <silent> ]c <Plug>(coc-diagnostic-next)
|
2022-06-23 10:45:58 +03:00
|
|
|
|
|
|
|
" Remap keys for gotos
|
|
|
|
nmap <silent> gd <Plug>(coc-definition)
|
2022-07-14 14:03:09 +03:00
|
|
|
nmap <silent> gy <Plug>(coc-type-definition)
|
2022-06-23 10:45:58 +03:00
|
|
|
nmap <silent> gi <Plug>(coc-implementation)
|
|
|
|
nmap <silent> gr <Plug>(coc-references)
|
|
|
|
|
|
|
|
" Remap for do code action of current line
|
2022-06-23 23:03:31 +03:00
|
|
|
nmap <localleader>a <Plug>(coc-codeaction)
|
2022-06-23 10:45:58 +03:00
|
|
|
|
|
|
|
" Remap for rename current word
|
2022-06-23 23:03:31 +03:00
|
|
|
nmap <localleader>n <Plug>(coc-rename)
|
2022-06-23 10:45:58 +03:00
|
|
|
|
2022-07-14 14:03:09 +03:00
|
|
|
" Mappings for CocList
|
|
|
|
nnoremap <localleader>cl :CocList<CR>
|
|
|
|
nnoremap <localleader>cd :CocList diagnostics<CR>
|
|
|
|
nnoremap <localleader>cc :CocList commands<CR>
|
2022-07-20 15:32:43 +03:00
|
|
|
nnoremap <localleader>co :CocList outline<CR>
|
|
|
|
nnoremap <localleader>cs :CocList symbols<CR>
|
2022-07-14 14:03:09 +03:00
|
|
|
|