feat(fzf): ignore current line for some lsp pickers

This commit is contained in:
Folke Lemaitre
2024-06-11 09:05:16 +02:00
parent 8bb653876c
commit c4818616d5

View File

@ -198,16 +198,12 @@ return {
"neovim/nvim-lspconfig",
opts = function()
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
-- stylua: ignore
vim.list_extend(Keys, {
{
"gd",
"<cmd>FzfLua lsp_definitions jump_to_single_result=true<cr>",
desc = "Goto Definition",
has = "definition",
},
{ "gr", "<cmd>FzfLua lsp_references jump_to_single_result=true<cr>", desc = "References", nowait = true },
{ "gI", "<cmd>FzfLua lsp_implementations jump_to_single_result=true<cr>", desc = "Goto Implementation" },
{ "gy", "<cmd>FzfLua lsp_typedefs jump_to_single_result=true<cr>", desc = "Goto T[y]pe Definition" },
{ "gd", "<cmd>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
{ "gr", "<cmd>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<cr>", desc = "References", nowait = true },
{ "gI", "<cmd>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
{ "gy", "<cmd>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
})
end,
},