Closed ckoehler closed 3 years ago
Duh, I think file
only handles searches for files. And there are some predefined options, so that all works. If I want grep or something, sounds like I need to do it custom.
I have the same issue with documentation. snap.run is understandable, but it executes immediately. How to map it?
Ah, answer is there: https://www.reddit.com/r/neovim/comments/nvl2fy/snap_a_nonblocking_finder_system_for_neovim_05/
snap.register.map({"n"}, {"<Leader>f"}, function ()
snap.run {
producer = snap.get'consumer.fzf'(snap.get'producer.ripgrep.file'),
select = snap.get'select.file'.select,
multiselect = snap.get'select.file'.multiselect,
views = {snap.get'preview.file'}
}
end)
It would be nice if this was in the Review.
It is in the Readme, but just as a text, and I missed it. Example would be still nice.
Sorry, I am having a hard time understanding how
snap.config.file
works, opposed tosnap.run
. I see thesnap.run
examples, and they make sense. It seems likesnap.config.file
returns a function that callssnap.run
. But if I usesnap.config.file
, how do I specifyselect
,multiselect
,view
, etc?Concretely, I understand this (from the readme):
How would I configure ripgrep above to also search hidden, etc, as in this
file
example?I.e., how do I combine the two and put them into
snap.maps
?