neovim: add range code action if it exists
This commit is contained in:
@@ -43,8 +43,11 @@ local function on_attach(client, bufnr)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<F2>", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set("n", "<leader>.", vim.lsp.buf.code_action, opts)
|
||||
|
||||
if not vim.lsp.buf.range_code_action == nil then
|
||||
vim.keymap.set("v", "<leader>.", vim.lsp.buf.range_code_action, opts)
|
||||
end
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>ee", function()
|
||||
vim.diagnostic.open_float(nil, { focus = false, scope = "line" })
|
||||
|
||||
Reference in New Issue
Block a user