mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 02:38:50 +02:00
refactor(lsp): remove lsp keymap dependency on telescope
This commit is contained in:
parent
425e6e0ea3
commit
8346fa7ddc
2 changed files with 18 additions and 8 deletions
|
@ -1,7 +1,3 @@
|
||||||
-- TODO:
|
|
||||||
-- - [ ] remove telescope util
|
|
||||||
-- - [ ] better lsp bindings
|
|
||||||
|
|
||||||
---@type LazyPicker
|
---@type LazyPicker
|
||||||
local picker = {
|
local picker = {
|
||||||
name = "telescope",
|
name = "telescope",
|
||||||
|
@ -242,4 +238,18 @@ return {
|
||||||
end
|
end
|
||||||
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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,11 @@ function M.get()
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
M._keys = {
|
M._keys = {
|
||||||
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
|
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
|
||||||
{ "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" },
|
{ "gd", vim.lsp.buf.definition(), desc = "Goto Definition", has = "definition" },
|
||||||
{ "gr", "<cmd>Telescope lsp_references<cr>", desc = "References", nowait = true },
|
{ "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" },
|
{ "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" },
|
{ "K", vim.lsp.buf.hover, desc = "Hover" },
|
||||||
{ "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
|
{ "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" },
|
{ "<c-k>", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue