Code Action
Usage #
Use :Lspsaga code_action
to invoke.
Tips #
- If you know the action do, just press the action number.
- If you don’t know what the action do, move to it. Take a look at the action preview, then press
<CR>
.
Default Options #
Default options in code_action
section:
num_shortcut = true
whether number shortcut for code actions are enabledshow_server_name = false
show language server nameextend_gitsigns = false
extend gitsigns plugin diff action
Default Keymaps #
Default keymaps in code_action.keys
section:
quit = 'q'
quit the float windowexec = '<CR>'
execute action
Why Does Lspsaga Show Different Code Action from Neovim Built-in? #
Neovim built-in code action uses line diagnostic to request for code action. Lspsaga uses cursor diagnostic, which removes potential noise from other places in the line.