refactor(lsp): remove lsp keymap dependency on telescope

This commit is contained in:
Folke Lemaitre
2024-06-13 06:33:10 +02:00
parent 425e6e0ea3
commit 8346fa7ddc
2 changed files with 18 additions and 8 deletions

View File

@ -1,7 +1,3 @@
-- TODO:
-- - [ ] remove telescope util
-- - [ ] better lsp bindings
---@type LazyPicker
local picker = {
name = "telescope",
@ -242,4 +238,18 @@ return {
end
end,
},
{
"neovim/nvim-lspconfig",
opts = function()
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
-- stylua: ignore
vim.list_extend(Keys, {
{ "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" },
{ "gr", "<cmd>Telescope lsp_references<cr>", desc = "References", nowait = true },
{ "gI", function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" },
{ "gy", function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" },
})
end,
},
}