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(telescope): improve file_ignore_patterns #25

Merged

Conversation

KevinNitroG
Copy link
Contributor

@KevinNitroG KevinNitroG commented Jun 12, 2024

this will ignore node_module and .git folders in across OSes (Windows, Linux, Mac...) (I guess)

without this commit, it will ignore some folder that shouldn't be ignored (ex: .github/ on Windows)

Edit: I think the reason it ignores is Windows use \ as path separator.
Edit: Here is the telescope.defaults.file_ignore_patterns doc.

this will ignore `node_module` and `.git` folders in across OSes
(Windows, Linux, Mac...) (I guess)

without this commit, it will ignore some folder that shouldn't be
ignored (ex: `.github/`)
@Alexis12119
Copy link
Owner

I think telescope.nvim is smart enough to just use / instead of \\.

@Alexis12119
Copy link
Owner

Alexis12119 commented Jun 13, 2024

For the node_modules you don't need to adjust it. Also, I didn't add a separator to really exclude them. But, if others need it then I'll probably add it.

@Alexis12119 Alexis12119 merged commit 54ca119 into Alexis12119:main Jun 13, 2024
@KevinNitroG
Copy link
Contributor Author

KevinNitroG commented Jun 13, 2024

I think telescope.nvim is smart enough to just use / instead of \\.

@Alexis12119 no ((: without \\, it will ignore too. It's like


I think for example, the .github/workflows/sth.yml path on windows it will be .github\workflows\sth.yml. And the pattern .git will match the path, so it will ignore the path.

If you only have the pattern .git/, the telescope isn't that smart as you thought and will won't match the path .github\workflows\sth.yml, also don't match the path of .git\ folder on Windows either.

And the result of only have .git/ is that it won't ignore either .git\ or .github\ on Windows.


Please use git revert if you want to revert the commit 😥

@KevinNitroG
Copy link
Contributor Author

I tested it on windows too though

Huhm, In this video I use your current patterns.

2024-06-13.11-12-19.mp4

It won't ignore all files in .git\ folder in my case.

@Alexis12119
Copy link
Owner

I'll just add .git\\

@Alexis12119
Copy link
Owner

It works maybe before because I didn't add a separator, but it causes to exclude something we don't want.

@KevinNitroG KevinNitroG deleted the telescope-improve-ignore-patterns branch July 1, 2024 10:01
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.

None yet

2 participants