Closed tex closed 4 months ago
I found your nvim config and learned about { filter_with = "cword" }
.
Awesome project. Trying to migrate to Snap from Telescope.
Well, I know this works for snap.config things. How to make it work for custom producer like this one?
snap.register.map({"n"}, {"<Leader>ft"}, function ()
snap.run {
producer = consumer(producer),
select = print,
prompt = "Hello >",
}
end)
consumer, producer are same as in ls example in the Readme.
This does it:
snap.register.map({"n"}, {"<Leader>ft"}, function ()
snap.run {
producer = consumer(producer),
select = print,
prompt = "Hello >",
initial_filter = "filter",
}
end)
cword / selection needs to be done manually.
How to pass initial filter to snap.run? Idea is I am under a word I want to grep to just press keybinding to initiate search and then refine it later in snap ui.