Skip to content
Discussion options

You must be logged in to vote

Technically you can use whatever you want. This is a simplified version of the actual grep finder:

With grep
vim.keymap.set('n', '<space>sg', function()
  Snacks.picker.pick {
    notify = false,
    format = 'file',
    show_empty = true,
    live = true,
    supports_live = true,
    finder = function(opts, ctx)
      local cmd = 'rg'
      local args = {
        '--color=never',
        '--line-number',
        '--column',
        '--max-columns=500',
        '-g=!.git',
      }
      vim.list_extend(args, opts.args or {}) ---@diagnostic disable-line
      local pattern, pargs = Snacks.picker.util.parse(ctx.filter.search)
      vim.list_extend(args, pargs)
      table.insert(args, '--')…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@alcroito
Comment options

@alcroito
Comment options

Answer selected by Flamme13
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@drowning-cat
Comment options

@Flamme13
Comment options

Comment options

You must be logged in to vote
1 reply
@Flamme13
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants