Skip to content
Discussion options

You must be logged in to vote

Yes, this is possible with 'mini.pick' by manually setting query on picker start. Something like this:

MiniPick.registry.grep_live_cword = function()
  -- Pre-compute the word when 'mini.pick' buffer is not yet current
  local cword = vim.fn.expand('<cword>')

  -- Create autocommand that will populate query after picker is opened
  local set_cword_query = function() MiniPick.set_picker_query({ cword }) end
  vim.api.nvim_create_autocmd('User', { once = true, pattern = 'MiniPickStart', callback = set_cword_query })

  -- Use regular `grep_live`
  MiniPick.builtin.grep_live()
end

Other approaches are more aligned with how 'mini.pick' works:

  • Use regular grep_live and manually enter word un…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.pick
3 participants