coc-actions
Note coc.nvim already support floating actions window, use it instead.
Actions menu for coc.nvim (neovim >= v0.4.0 only)
Installation
:CocInstall coc-actions
Commands
:CocCommand actions.open
for current cursor position
Mapping
Config as coc.nvim README
" Remap for do codeAction of selected region
function! s:cocActionsOpenFromSelected(type) abort
execute 'CocCommand actions.open ' . a:type
endfunction
xmap <silent> <leader>a :<C-u>execute 'CocCommand actions.open ' . visualmode()<CR>
nmap <silent> <leader>a :<C-u>set operatorfunc=<SID>cocActionsOpenFromSelected<CR>g@
Then
<leader>a
for the current selected range<leader>aw
for the current word<leader>aas
for the current sentence<leader>aap
for the current paragraph
:h text-objects
to see more detail
Settings
coc-actions.hideCursor
: trueHide cursor when open actions menu
coc-actions.showActionKind
: trueShow action kind
coc-actions.useCursorLine
: falseUsing cursorline for active line, this avoids tail whitespace