Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add filemask action for live_grep picker #1723

Closed

Conversation

antosha417
Copy link
Contributor

When I use live_grep in a huge repo sometimes there are too many results to scroll through. This is when filemask filters like some/path/*/*.{lua,vim} come in handy.
The only problem is that I can see that there are too many results only after I typed a search query. So I need to close live_grep, open it again with a right filemask and then retype my query.
I want to be able to call filemask_filter action to filter out results I don't need in live_grep

@antosha417
Copy link
Contributor Author

I also have an idea to be able to filter out results by file type. rg have builtin file types that can be passed to telescope. But I couldn't figure out a proper way to save prompt content for live_grep when another telescope picker is opened
2022-01-25 02-25-38

@Conni2461
Copy link
Member

Not sure if we want this action in core. Could just be a wiki entry somewhere here: https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes

@aidos
Copy link

aidos commented Jan 29, 2022

Thanks @antosha417 for the idea on how to do this. I've been looking myself for a way to better control rg. I was wondering if it made sense to allow live_grep to parse the command as arguments instead of as the search text (say if the prompt begins with --).

So then we could just use --type python -- my search here (or any other rg flags we wanted)

@aidos
Copy link

aidos commented Jan 29, 2022

Ah ha, just found this PR and this offshoot extension which is exactly the idea I was looking for above. Will point my attention that way instead.

@Conni2461
Copy link
Member

https://github.com/nvim-telescope/telescope-rg.nvim is a good solution that does this in the prompt.

Closing this as this can be done from user side

@Conni2461 Conni2461 closed this May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants