From 5abb10b5ab3c2c5462f699fc98f618f39543f8f4 Mon Sep 17 00:00:00 2001 From: alexander-born <61082865+alexander-born@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:29:57 +0100 Subject: [PATCH] fix(lsp): only map lsp goto definition when client has definitionProvider (#348) Co-authored-by: Alexander Born --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index e47bf464..e221cfcf 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -12,7 +12,7 @@ function M.get() M._keys = { { "cd", vim.diagnostic.open_float, desc = "Line Diagnostics" }, { "cl", "LspInfo", desc = "Lsp Info" }, - { "gd", "Telescope lsp_definitions", desc = "Goto Definition" }, + { "gd", "Telescope lsp_definitions", desc = "Goto Definition", has = "definition" }, { "gr", "Telescope lsp_references", desc = "References" }, { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" }, { "gI", "Telescope lsp_implementations", desc = "Goto Implementation" },