neovim: Handle Mason breaking changes
This commit is contained in:
parent
3646bc6057
commit
6931683c55
6 changed files with 77 additions and 257 deletions
16
neovim/ftplugin/rust.lua
Normal file
16
neovim/ftplugin/rust.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
|
||||
function rustLspMap(mode, keys, cmd)
|
||||
vim.keymap.set(
|
||||
mode,
|
||||
keys,
|
||||
function() vim.cmd.RustLsp(cmd) end,
|
||||
{ silent = true, buffer = bufnr }
|
||||
)
|
||||
end
|
||||
|
||||
-- Use rust-analyzer's grouping of actions
|
||||
rustLspMap("n", "gra", "codeAction")
|
||||
|
||||
-- Use rustaceanvim's hover actions
|
||||
rustLspMap("n", "K", {'hover', 'actions'})
|
||||
Loading…
Add table
Add a link
Reference in a new issue