nixvim
nixvim copied to clipboard
[BUG] keymaps: mapping telescope's undo extension breaks custom keymaps
| Field | Description |
|---|---|
| Plugin | telescope |
| Nixpkgs | 63c3a29ca82437c87573e4c6919b09a24ea61b0f |
| Home Manager | 9036fe9ef8e15a819fa76f47a8b1f287903fb848 |
- [x] I have read the FAQ and my bug is not listed there.
Description
Binding a key to Telescope's undo plugin causes custom keymaps to stop working.
Minimal, Reproducible Example
programs.nixvim = {
plugins.which-key.enable = true; # helps see what's happening
plugins.telescope = {
enable = true;
keymaps = {
###### the problematic line - comment this to "fix" the bug
"<leader>fu" = { action = "undo"; options.desc = "Telescope Undo"; };
# These should work fine
"<leader>ff" = { action = "builtin"; options.desc = "Telescope Builtin"; };
"<leader>fg" = { action = "live_grep"; options.desc = "Telescope Live Grep"; };
};
# NOTE: the undo plugin doesn't have to be enabled
#extensions.undo.enable = true;
};
# test keymaps
globals.mapleader = " ";
keymaps = [
{
action = "<cmd>help<CR>";
key = "gh";
mode = [ "n" ];
}
{
action = "<cmd>help<CR>";
key = "yu";
mode = [ "n" ];
}
{
action = "<cmd>help<CR>";
key = "<leader>g";
mode = [ "n" ];
}
];
}
Steps to reproduce
- load nixvim with the config above
- try using any of the custom keymaps (
gh,yu,<leader>g)- they don't work (help page doesn't open)
- note that
<leader>ffand the othertelescope.keymapsoptions work (as they should)
- comment line 8 (the problematic line)
- try using the custom keymaps from before
- help page opens, they work
- all other
telescope.keymapsoptions still work
it took me 2 days to find this :sob: