From 71559e9ece92eac61e8c6ecb4c6d7ed14074ce99 Mon Sep 17 00:00:00 2001 From: CPea Date: Sat, 6 Apr 2024 21:54:29 +0700 Subject: [PATCH] fix(rust): `gd` as go to definition key --- lua/pea/config/rustacean.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/pea/config/rustacean.lua b/lua/pea/config/rustacean.lua index 0ca4c26..4019e56 100644 --- a/lua/pea/config/rustacean.lua +++ b/lua/pea/config/rustacean.lua @@ -3,5 +3,11 @@ return function() tools = { executor = "toggleterm", }, + server = { + on_attach = function() + -- repair the functionality of go to definition. + vim.keymap.set("n", "gd", vim.lsp.buf.definition) + end, + }, } end