-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
rg: file_ignore_patterns will be ignored in searches #1182
Comments
If I see it correctly, this is working as intended. The option is gathered from your global defaults telescope.nvim/lua/telescope/pickers.lua Line 94 in dcee6c8
and then run on your picker if applicable telescope.nvim/lua/telescope/pickers.lua Lines 1013 to 1027 in dcee6c8
I think you either want to (a) pass |
@fdschmidt93 thank you for your quick response. I see that the code does that, but how can the actual behavior be intended? I think the code is wrong. It should only skip a file based on Edit: Fixed typo. :-) Again... |
Sorry, I read / thought about this a bit to fast and misunderstood your original issue -- you are of course right :)
Generally, yes. I think the better default is to turn it around and prefer Would you be happy to submit the fix via a PR? :) Otherwise I'll do that some time this week. As a side note, more generally, we probably should unify all |
I could provide a PR that changes
to
I am completely new to the code base and I don't see any tests for |
Apologies, I didn't provide sufficient background, I meant something like this local file = vim.F.if_nil(entry.filename, type(entry.value) == "string" and entry.value) -- false if none is true
Good question. That part I'm not so familiar with myself. I guess we'd have to come up with something that isolates But I'd personally be fine fixing this without a test for the time being. |
Hi, @fdschmidt93 First question: how could I try my changes if I'm also using Telescope myself? Should I just use another neovim config? I could include my fork on my runtimepath, but that will cause conflicts with Telescope, right? If I do require('telescope') for example. |
There's probably a nicer way of doing that but I just point packer to my fork and switch branches when needed with telescope. The primary downside of this is you have to update yourself with git fetch upstream master and git rebase upstream master. It's one of the things that doesn't bother me so much though. Maybe another maintainer or reddit has better answers though. |
A couple of things: first I just copy the line you suggested. Should I make some teaks? I'm not sure about how could I improve this. Also, I'm kinda lost going from .lua to .lua. I was looking up the neovim help, but I wasn't able to find help about functions like Picker:get_result_processor. Are there some docs I'm not finding? Or should I just keep looking upt the code? And, finally, while tryng out the change I foung that, on Windows, the pattern |
Just make a PR how you see fit and I'll have a look at the diff then :)
Is that required for this PR? Mid-to-long-term, if you want to continue contributing on more challenging matters I guess yes, I'm afraid you'll have to go through it largely by yourself to understand what's going on. However, there's also #927 at which you can look to give you a better idea.
Wouldn't Windows users then just use backslashes? Am I missing something? |
Ok, so, I think I have made my first PR #1243 . Tell me if I have done something wrong.
Not really, but I was kinda excited, so I was trying to start understanding all the code base.
Thanks, I will definetly take a look at it :3.
Yeah, that makes sense, I was just wondering if that was intended because I prefer using normal slashes as much as possible for paths as a Windows user. |
I think this is fixed now. Closing. If this is still an issue, feel free to reopen :) |
Description
This is my setup:
When I use
live_grep
and search forwork.build
nothing is found. I have a lot of files including the string.work/build/...
. When I remove the pattern".work/.*"
fromfile_ignore_patterns
I find all the matches and the output matches that ofrg
run in a shell.Perhaps I am doing something wrong here.
Neovim version
NVIM v0.6.0-dev+nightly-353-gff0833cb4
Operating system and version
macOS 11.5
Steps to reproduce
See above.
Expected behavior
file_ignore_patterns
should only affect the files that are searched.Actual behavior
See above.
Minimal config
The text was updated successfully, but these errors were encountered: