From 597a3cc889c1d16dc38ae4c61f9b542d5258815f Mon Sep 17 00:00:00 2001 From: Andrii Berezhynskyi Date: Fri, 21 Jul 2023 13:28:26 +0000 Subject: [PATCH] fix: do not ignore mappings from `setup()` when attach_mappings provided (#2613) --- lua/telescope/builtin/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua index d2ded8c..979615b 100644 --- a/lua/telescope/builtin/init.lua +++ b/lua/telescope/builtin/init.lua @@ -551,6 +551,14 @@ local apply_config = function(mod) end end + if defaults.attach_mappings and opts.attach_mappings then + local opts_attach = opts.attach_mappings + opts.attach_mappings = function(prompt_bufnr, map) + defaults.attach_mappings(prompt_bufnr, map) + return opts_attach(prompt_bufnr, map) + end + end + v(vim.tbl_extend("force", defaults, opts)) end end