nix/nvim: change coc key bindings
This commit is contained in:
parent
5a504d3aa8
commit
e247ec6eda
1 changed files with 5 additions and 8 deletions
|
@ -21,9 +21,9 @@ inoremap <silent><expr> <c-space> coc#refresh()
|
||||||
" position. Coc only does snippet and additional edit on confirm.
|
" position. Coc only does snippet and additional edit on confirm.
|
||||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||||
|
|
||||||
" Use `[g` and `]g` for navigate diagnostics
|
" Use `[c` and `]c` for navigate diagnostics
|
||||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
nmap <silent> [c <Plug>(coc-diagnostic-prev)
|
||||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
nmap <silent> ]c <Plug>(coc-diagnostic-next)
|
||||||
|
|
||||||
" Remap keys for gotos
|
" Remap keys for gotos
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
nmap <silent> gd <Plug>(coc-definition)
|
||||||
|
@ -32,11 +32,8 @@ nmap <silent> gi <Plug>(coc-implementation)
|
||||||
nmap <silent> gr <Plug>(coc-references)
|
nmap <silent> gr <Plug>(coc-references)
|
||||||
|
|
||||||
" Remap for do code action of current line
|
" Remap for do code action of current line
|
||||||
nmap <leader>la <Plug>(coc-codeaction)
|
nmap <localleader>a <Plug>(coc-codeaction)
|
||||||
|
|
||||||
" Remap for rename current word
|
" Remap for rename current word
|
||||||
nmap <leader>ln <Plug>(coc-rename)
|
nmap <localleader>n <Plug>(coc-rename)
|
||||||
|
|
||||||
" Remap for do action format
|
|
||||||
nnoremap <silent> F :call CocAction('format')<CR>
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue