Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not ignore mappings from setup() when attach_mappings provided #2613

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: do not ignore mappings from setup() when attach_mappings provided
  • Loading branch information
molecule-man committed Jul 21, 2023
commit 9e1cfc78eedc83e544cd65ab871a43d7023f2fb8
8 changes: 8 additions & 0 deletions lua/telescope/builtin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down