nix/nvim: change coc key bindings

This commit is contained in:
Dmitriy Pleshevskiy 2022-06-23 23:03:31 +03:00
parent 5a504d3aa8
commit e247ec6eda
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -21,9 +21,9 @@ inoremap <silent><expr> <c-space> coc#refresh()
" 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)
" 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)
@ -32,11 +32,8 @@ 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)
nmap <localleader>a <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>
nmap <localleader>n <Plug>(coc-rename)