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
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 18 additions and 8 deletions

View file

@ -14,11 +14,11 @@ function M.get()
-- stylua: ignore
M._keys = {
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
{ "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 },
{ "gd", vim.lsp.buf.definition(), desc = "Goto Definition", has = "definition" },
{ "gr", vim.lsp.buf.references(), desc = "References", nowait = true },
{ "gI", vim.lsp.buf.implementation(), desc = "Goto Implementation" },
{ "gy", vim.lsp.buf.type_definition(), desc = "Goto T[y]pe Definition" },
{ "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" },
{ "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" },
{ "K", vim.lsp.buf.hover, desc = "Hover" },
{ "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
{ "<c-k>", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },