From d1e2e4dea6627246c92f70fd7b2416edc0bf3da6 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Wed, 17 Apr 2024 11:01:17 +0200 Subject: [PATCH] Add rust keybinds for lsp actions --- nvim/lua/plugs/rustaceanvim.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/nvim/lua/plugs/rustaceanvim.lua b/nvim/lua/plugs/rustaceanvim.lua index 0148623..79b26bc 100644 --- a/nvim/lua/plugs/rustaceanvim.lua +++ b/nvim/lua/plugs/rustaceanvim.lua @@ -25,6 +25,29 @@ return { end, }) end + + require("utils").add_keymaps({ + n = { + ["gd"] = { + cmd = function() + vim.lsp.buf.definition() + end, + opts = { + noremap = true, + silent = true + } + }, + ["gD"] = { + cmd = function() + vim.lsp.buf.declaration() + end, + opts = { + noremap = true, + silent = true + } + }, + } + }) end, } }