blob: 4060c9d63a04ff92b0de19d70400a422a55f1302 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set("n", "<leader>ca", function()
vim.cmd.RustLsp("codeAction") -- supports rust-analyzer's grouping
-- or vim.lsp.buf.codeAction() if you don't want grouping.
end, { silent = true, buffer = bufnr })
vim.keymap.set(
"n",
"K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
function()
vim.cmd.RustLsp({ "hover", "actions" })
end,
{ silent = true, buffer = bufnr }
)
|