diff --git a/neovim/lua/plugins/lsp.lua b/neovim/lua/plugins/lsp.lua index d863416..2cac5c3 100644 --- a/neovim/lua/plugins/lsp.lua +++ b/neovim/lua/plugins/lsp.lua @@ -144,13 +144,17 @@ local function get_default_attach(override_capabilities) -- Some override some fuzzy finder bindings to use lsp sources if utils.try_require("telescope") ~= nil then -- Replace some Telescope bindings with LSP versions - buf_set_keymap("n", "t", "Telescope lsp_document_symbols", opts) - buf_set_keymap("n", "ft", "Telescope lsp_dynamic_workspace_symbols", opts) - buf_set_keymap("n", "ft", "Telescope lsp_dynamic_workspace_symbols", opts) + if client.resolved_capabilities.goto_definition then + buf_set_keymap("n", "t", "Telescope lsp_document_symbols", opts) + buf_set_keymap("n", "ft", "Telescope lsp_dynamic_workspace_symbols", opts) + buf_set_keymap("n", "ft", "Telescope lsp_dynamic_workspace_symbols", opts) + end -- Replace some LSP bindings with Telescope ones - lsp_keymap("d", "Telescope lsp_definitions") - lsp_keymap("t", "Telescope lsp_type_definition()") + if client.resolved_capabilities.goto_definition then + lsp_keymap("d", "Telescope lsp_definitions") + lsp_keymap("t", "Telescope lsp_type_definition()") + end lsp_keymap("i", "Telescope lsp_implementations") lsp_keymap("r", "Telescope lsp_references") lsp_keymap("A", "Telescope lsp_code_actions")