aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/vim/_defaults.lua11
-rw-r--r--runtime/lua/vim/diagnostic.lua2
2 files changed, 9 insertions, 4 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()
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua
index 1ed09b51a5..b34541c72e 100644
--- a/runtime/lua/vim/diagnostic.lua
+++ b/runtime/lua/vim/diagnostic.lua
@@ -153,7 +153,7 @@ local M = {}
---
--- @field focus_id? string
---
---- @field border? string see |vim.api.nvim_open_win()|.
+--- @field border? string see |nvim_open_win()|.
--- @class vim.diagnostic.Opts.Underline
---