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

feat(live_grep): Allow passing multiple file types for type_filter #3361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devansh08
Copy link

@devansh08 devansh08 commented Nov 10, 2024

Description

This PR allows passing multiple file types to type_filter in the live_grep builtin. Previously, only a single file type was allowed.
This implementation accepts a comma separated string (easier when using the :Telescope live_grep command) or a table of strings. It splits the input and passes it as multiple --type args to ripgrep.

Type of change

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration

  • :Telescope live_grep type_filter=lua
  • :Telescope live_grep type_filter=lua,md
  • :lua require("telescope.builtin").live_grep({type_filter="lua"})
  • :lua require("telescope.builtin").live_grep({type_filter={"lua","md"}})

Configuration:

  • Neovim version (nvim --version): v0.10.2
  • Operating system and version: Arch Linux

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

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.

1 participant