coc-actions

1.5.0 • Public • Published

coc-actions

Actions menu for coc.nvim (neovim >= v0.4.0 only)

image

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: true

    Hide cursor when open actions menu

  • coc-actions.showActionKind: true

    Show action kind

  • coc-actions.useCursorLine: false

    Using cursorline for active line, this avoids tail whitespace

Buy Me A Coffee ☕️

btc

image

Package Sidebar

Install

npm i coc-actions

Weekly Downloads

39

Version

1.5.0

License

MIT

Unpacked Size

81.9 kB

Total Files

3

Last publish

Collaborators

  • yuuko