|
So as the title says I'm having a problem where my general picker preview keymaps are not applying on previews over existing buffers. Related to this issue #773. Wanted to check if anyone else has experienced this or can corroborate that it's not just an issue on mi side. It should be reproducible with this config return {
{
"folke/snacks.nvim",
---@type snacks.Config
opts = {
picker = {
win = {
input = {
keys = {
["<c-p>"] = { function() vim.notify("This works in all previews") end },
},
},
preview = {
keys = {
["<c-p>"] = { function() vim.notify("This only works in scratch buffer previews") end },
},
},
},
},
}
}
}Then open a picker and test the keymaps on previews over scratch buffers and existing buffers. |
Replies: 1 comment 2 replies
|
Okay well I thought about it a second and realized this makes sense considering those previews are just the real buffer displayed in the preview window, so we just get the keymaps any real buffer would. The "preview" is even modifiable 💀 I find this behavior very counter intuitive and don't see any advantages to it... (except having a "live" preview without needing to save the file, which I don't find particularly useful). |
Discussed here #1417