forked from neovim/neovim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lsp): add range option to code_action; deprecate range_code_acti…
…on (neovim#19551) `code_action` gained extra functions (`filter` and `apply`) which `range_code_action` didn't have. To close this gap, this adds a `range` option to `code_action` and deprecates `range_code_action`. The option defaults to the current selection if in visual mode. This allows users to setup a mapping like `vim.keymap.set({'v', 'n'}, '<a-CR>', vim.lsp.buf.code_action)` `range_code_action` used to use the `<` and `>` markers to get the _last_ selection which required using a `<Esc><Cmd>lua vim.lsp.buf.range_code_action()<CR>` (note the `<ESC>`) mapping.
- Loading branch information
1 parent
becde0a
commit 463b903
Showing
3 changed files
with
94 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters