Configure registry for picker with Ctrl-r + Ctrl-w #1809
-
Contributing guidelines
Module(s)mini.clue QuestionHi, I am trying to recreate the same behavior I got with folke/which-key of mapping Ctrl-r + Ctrl-w when I open a picker (Snacks.picker or Telescope). I want to be able to paste into the buffer whatever is under the cursor (which is the default behavior of n/vim in command mode). Which-key somehow configured this by default also in the picker input, but I can’t find any example configuration for clue. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Unfortunately, currently in 'mini.pick' there is no way to use local populate_registers = function()
local win_id = MiniPick.get_picker_state().windows.target
vim.api.nvim_win_call(win_id, function() vim.fn.setreg('w', vim.fn.expand('<cword>')) end)
end
vim.api.nvim_create_autocmd('User', { pattern = 'MiniPickStart', callback = populate_registers }) Then typing I think support of various |
Beta Was this translation helpful? Give feedback.
-
@echasnovski is it something that should be handled by the picker? |
Beta Was this translation helpful? Give feedback.
-
Most special registers are now supported out of the box. Thanks again for pointing out this feature! |
Beta Was this translation helpful? Give feedback.
Most special registers are now supported out of the box. Thanks again for pointing out this feature!