Decouple the builtin find_files finder from the picker #3643
-
|
I wrote a simple extension to allow filtering to a subset of projects in a monorepo, and to do that I used a picker that looks for package.json files using the functionality in find_files. However, because I needed a different action/previewer/prompt title/etc, I had to copy paste a decent chunk of the code from It would be nice to decouple the logic that creates the finder from the rest of the find_files picker so that extensions could make use of the existing logic to create the finder but with different previewers/titles/etc |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
Huh, so it does, neat. Deleted the huge chunk of redundant code, thanks |
Beta Was this translation helpful? Give feedback.
optsthat is passed in, is merged in https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/__files.lua#L389-L397require("telescope.builtin").find_files({prompt_title="asdf"})works like a charm. should also work withactionandpreviewer