Skip to content

How to filter filters using Snacks.picker.grep() ? #461

Answered by folke
robsonpeixoto asked this question in Q&A
Discussion options

You must be logged in to vote

From the ui:

  • search for something, like function.
  • Then press <c-g>, this toggles live mode. Your search filter will switch.
  • You can now use matcher syntax, so type something like file:lua$
  • You'll now see lua results containing function
  • Press <c-G> again to change the search filter, while the filename will also still be used

A more performant way would be to start the picker with Snacks.grep({glob = "*.lua"}).
This will prefilll the file glob pattern for the ripgrep command.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by robsonpeixoto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants