From 638eaff0319c3603364d12d59bc36154d31d9461 Mon Sep 17 00:00:00 2001 From: Richard Marbach Date: Sun, 29 Dec 2024 18:14:25 +0100 Subject: [PATCH] feat(pickers): attach mapping is configurable from options --- lua/telescope/builtin/__files.lua | 2 +- lua/telescope/builtin/__lsp.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/builtin/__files.lua b/lua/telescope/builtin/__files.lua index 27b8d1c927..f967e608ed 100644 --- a/lua/telescope/builtin/__files.lua +++ b/lua/telescope/builtin/__files.lua @@ -180,7 +180,7 @@ files.live_grep = function(opts) -- TODO: It would be cool to use `--json` output for this -- and then we could get the highlight positions directly. sorter = sorters.highlighter_only(opts), - attach_mappings = function(_, map) + attach_mappings = opts.attach_mappings or function(_, map) map("i", "", actions.to_fuzzy_refine) return true end, diff --git a/lua/telescope/builtin/__lsp.lua b/lua/telescope/builtin/__lsp.lua index aeb99575ac..6ad00c9107 100644 --- a/lua/telescope/builtin/__lsp.lua +++ b/lua/telescope/builtin/__lsp.lua @@ -473,7 +473,7 @@ lsp.dynamic_workspace_symbols = function(opts) }, previewer = conf.qflist_previewer(opts), sorter = sorters.highlighter_only(opts), - attach_mappings = function(_, map) + attach_mappings = opts.attach_mappings or function(_, map) map("i", "", actions.to_fuzzy_refine) return true end,