feat(rust): Add keybinds
This commit is contained in:
parent
0f5b67d355
commit
e801e69cf2
1 changed files with 5 additions and 2 deletions
|
@ -46,8 +46,11 @@ return {
|
||||||
server = {
|
server = {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
opts = { silent = true, buffer = bufnr }
|
opts = { silent = true, buffer = bufnr }
|
||||||
vim.keymap.set("n", "<leader>a", function() vim.cmd.RustLsp('codeAction') end, opts)
|
vim.keymap.set("n", "<leader>a", function() vim.cmd.RustLsp("codeAction") end, opts)
|
||||||
vim.keymap.set("n", "K", function() vim.cmd.RustLsp({'hover', 'actions'}) end, opts)
|
vim.keymap.set("n", "K", function() vim.cmd.RustLsp({"hover", "actions"}) end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>rd", function() vim.cmd.RustLsp({"renderDiagnostic", "cycle"}) end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>rr", function() vim.cmd.RustLsp({"relatedDiagnostics"}) end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>rm", function() vim.cmd.RustLsp({"expandMacro"}) end, opts)
|
||||||
vim.opt_local.colorcolumn = "100"
|
vim.opt_local.colorcolumn = "100"
|
||||||
end,
|
end,
|
||||||
default_settings = {
|
default_settings = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue