Skip to content

changed merging behavior for picker_keymaps to prevent double assignment#155

Open
Keksmo wants to merge 1 commit into
jghauser:mainfrom
Keksmo:fix-keymaps
Open

changed merging behavior for picker_keymaps to prevent double assignment#155
Keksmo wants to merge 1 commit into
jghauser:mainfrom
Keksmo:fix-keymaps

Conversation

@Keksmo

@Keksmo Keksmo commented May 9, 2026

Copy link
Copy Markdown

Why is this fix needed?

The current implementation of the merging logic of user options and defaults makes it so that when assigning a keybind for the pickers, it does not delete the old keybind, but just assigns both. The problem with that is, that for example the search picker uses per default, which conflicts with Telescope's default navigation and can not be unbound do to the current merging logic (not even by disabling the default keybinds).

What this does

This adjusts the merging logic, so that if a keybind is set for a picker, it will only use the keybinds assigned by the user. However, it will require setting all keybinds for that picker as soon as one keybind is overwritten, because otherwise merging them would not (easily) be possible due to differing filestructures, which would require a detection for the executed command and therefore require changing the config (at least to my knowledge, i'm not that knowledgable in lua)

I do recognize that this introduces a breaking change for people who partially overwrote the picker_keymaps. However, in my opinion it is worth introducing this change, because adding the default 4 lines of config are not as big of a deal than making subfunctions of the plugin unusuable when using other plugins that require certain keybinds. Of course i'm open to other suggestions tho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant