diff options
Diffstat (limited to 'runtime/lua/vim/_defaults.lua')
-rw-r--r-- | runtime/lua/vim/_defaults.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua index 7166f7a23c..1094f22793 100644 --- a/runtime/lua/vim/_defaults.lua +++ b/runtime/lua/vim/_defaults.lua @@ -159,9 +159,14 @@ do vim.lsp.buf.rename() end, { desc = 'vim.lsp.buf.rename()' }) - vim.keymap.set({ 'n', 'v' }, 'crr', function() - vim.lsp.buf.code_action() - end, { desc = 'vim.lsp.buf.code_action()' }) + local function map_codeaction(mode, lhs) + vim.keymap.set(mode, lhs, function() + vim.lsp.buf.code_action() + end, { desc = 'vim.lsp.buf.code_action()' }) + end + map_codeaction('n', 'crr') + map_codeaction('x', '<C-R>r') + map_codeaction('x', '<C-R><C-R>') vim.keymap.set('n', 'gr', function() vim.lsp.buf.references() |