Open kekscode opened 1 month ago
I think you should not use default mappings (set use_default_mappings
to false
) and just adapt default mappings to your needs (refer to documentation: https://github.com/gbprod/yanky.nvim?tab=readme-ov-file#pickertelescopeuse_default_mappings)
I did this (and tried again), but <c-k>
still pastes what is currently selected in the picker window in the line above the cursor. I think i have to dive a bit deeper into the code. I currently suspect that the custom mappings do not work at all in my config.
What irritates me is, that the telescope config works for every other plugin and for the builtins completely fine.
Is there a good way to debug mappings with e.g. print statements or the like?
Pretty sure now, that the custom mappings do not get applied at all, even with use_default_mappings
as false
. The function yank_history.attach_mappings(_, map)
looks good, though i am not used to lua code apart from config tables. But i don't see an issue and this is the only function which could lead to a problem. I wonder if i have something crazy in my config which has a side effect or shadows my custom config with the defaults. Is there a way to print the effective configuration table of yanky at runtime? Something like vim.inspect
?
I changed this now and get a different telescope window:
+vim.api.nvim_set_keymap("n", "<leader>y", '<cmd>YankyRingHistory<cr>',
-vim.api.nvim_set_keymap("n", "<leader>y", '<cmd>lua require("telescope").extensions.yank_history.yank_history({ })<cr>',
and in this window, <c-k
just works.
I am in a try-and-error loop mapping
<c-k>
ini
mode for navigating the picker items, but the<c-k>
keeps pasting the selected item no matter what mapping i try to apply in my settings.My use case is: I use
<c-k>
and<c-j>
in all my telescope pickers to move up/down the picker items and press<cr>
to select. This works everywhere (built-in plugins and additional plugins).Somehow yanky seems to break the mapping of
<c-k>
in all configurations i tried (minimal, explicitely re-mapping, applying the defaults, etc.).Any idea what i am doing wrong or what i overlook? Or maybe an issue with keymap merging logic?
My configs:
yanky (full):
telescope (very long, only mappings):