diff --git a/home-manager/roles/neovim/vimrc b/home-manager/roles/neovim/vimrc index 48fc4933..096aeb88 100644 --- a/home-manager/roles/neovim/vimrc +++ b/home-manager/roles/neovim/vimrc @@ -162,12 +162,6 @@ endfunction nnoremap i :call show_documentation() -" Remap for rename current word -nnoremap r (coc-rename) - -" Remap for format selected region -xmap f (coc-format-selected) -nnoremap f (coc-format-selected) augroup mygroup autocmd! @@ -177,11 +171,8 @@ augroup mygroup autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') augroup end -" Remap for do codeAction of selected region, ex: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nnoremap a (coc-codeaction-selected) -nnoremap f :Format -nnoremap l (coc-codelens-action) +nnoremap f :call CocAction('format') +nnoremap l :call CocAction('codeLensAction') " FZF ctrl-p style search nnoremap p :Files @@ -220,8 +211,6 @@ nnoremap (coc-range-select) xmap (coc-range-select) xmap (coc-range-select-backword) -" Use `:Format` to format current buffer -command! -nargs=0 Format :call CocAction('format') " Use `:Fold` to fold current buffer command! -nargs=? Fold :call CocAction('fold', )