From f31fb46bd4e997eb812f985a9be0e2f2a3f8c9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20=C5=BDdanov?= Date: Fri, 31 Jan 2025 10:41:59 +0200 Subject: [PATCH] feat(fzf-lua): directly go to definition when only a single result (#1339) feat(fzf-lua): add directly go to definition when single result --- lua/astrocommunity/fuzzy-finder/fzf-lua/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/astrocommunity/fuzzy-finder/fzf-lua/init.lua b/lua/astrocommunity/fuzzy-finder/fzf-lua/init.lua index 85c397860..c98cae787 100644 --- a/lua/astrocommunity/fuzzy-finder/fzf-lua/init.lua +++ b/lua/astrocommunity/fuzzy-finder/fzf-lua/init.lua @@ -13,7 +13,9 @@ return { local maps = opts.mappings maps.n["lD"] = { function() require("fzf-lua").diagnostics_document() end, desc = "Search diagnostics" } - if maps.n.gd then maps.n.gd[1] = function() require("fzf-lua").lsp_definitions() end end + if maps.n.gd then + maps.n.gd[1] = function() require("fzf-lua").lsp_definitions { jump_to_single_result = true } end + end if maps.n.gI then maps.n.gI[1] = function() require("fzf-lua").lsp_implementations() end end if maps.n["lR"] then maps.n["lR"][1] = function() require("fzf-lua").lsp_references() end end if maps.n.gy then maps.n.gy[1] = function() require("fzf-lua").lsp_typedefs() end end