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

g:Lf_WildIgnore doesn't seem to work anymore #53

Closed
MightyCreak opened this issue Jul 19, 2017 · 13 comments
Closed

g:Lf_WildIgnore doesn't seem to work anymore #53

MightyCreak opened this issue Jul 19, 2017 · 13 comments

Comments

@MightyCreak
Copy link

I used g:Lf_WildIgnore in my .vimrc to filter out some unwanted binary files. But until recently, it doesn't seem to filter anything anymore, the default filters works (e.g. '*.o'), but not my filters (e.g. '*.a').

I tested with that and I still see the *.a files:

            \ 'dir': ['.svn','.git','.hg'],
            \ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.a','*.so','*.py[co]']
            \}```
@Yggdroot
Copy link
Owner

By default LeaderF use git or hg if your repository is under control of them, then g:Lf_WildIgnore will be ignored, because there is already a .gitignore or .hgignore.
let g:Lf_UseVersionControlTool = 0, LeaderF will use rg or pt or ag or find to index the files, g:Lf_WildIgnore will work as expected.

@MightyCreak
Copy link
Author

Hey, sorry for the delay.

Indeed, .hgignore works, but considering the size of the project I'm working on (several millions lines of code across multiple platforms), there are part of the project that isn't relevant to me, but it is to others and that's why it is not in the project's .hgignore.

It would be nice to have both: follow the .hgignore but also be able to set your own rules in the LeaderF configuration.

Would be nice to reopen the issue, considering this request.

Thanks!

Yggdroot added a commit that referenced this issue Aug 10, 2017
only available for hg, not available for git
@Yggdroot
Copy link
Owner

Yggdroot commented Aug 11, 2017

Fixed, but only available for hg, not for git.

@MightyCreak
Copy link
Author

That's weird, it's not deterministic... But thanks mate ;)

@ghost
Copy link

ghost commented Aug 1, 2018

I've let g:Lf_UseVersionControlTool = 0 set but its still ignoring files form .gitignore. How can I ignore the .gitignore?

@retzzz
Copy link

retzzz commented Mar 19, 2020

Is this option (g:Lf_WildIgnore) working for regex mode?
Here is my setting:

let g:Lf_UseVersionControlTool=0
let g:Lf_WildIgnore = {
        \ 'dir': ['.svn','.git','.hg'],
        \ 'file': ['*.vcxproj','*.vcproj','*.lib','*.bak','*.exe','*.o','*.so','*.py[co]','*.obj']
        \}

But :Leaderf rg -F -w -e xyz still search the file I want to ignore.

@Yggdroot
Copy link
Owner

yes

@retzzz
Copy link

retzzz commented Mar 19, 2020

yes

@Yggdroot Do you mean it should be working for regex mode? But why I cannot ignore the files? Is my setting correct? What else should I do to make it work?

@Yggdroot
Copy link
Owner

these options only work for Leaderf file, if you want to ignore files when using Leaderf rg, Leaderf rg -g! xxx

@retzzz
Copy link

retzzz commented Mar 19, 2020

@Yggdroot Thank you. This command leaderf rg -g!xxx is working.

@retzzz
Copy link

retzzz commented Mar 21, 2020

@Yggdroot
Suggest to let options g:Lf_UseVersionControlTool and g:Lf_WildIgnore work for Leaderf rg as well. So all functions of Leaderf will be consistent.

@weisiok365
Copy link

file "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/cli.py", line 696, in input^@ callback()^@ File "/root/.vim/plugged/LeaderF/autoload/l
eaderf/python/leaderf/manager.py", line 70, in deco^@ func(self, *args, **kwargs)^@ File "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/ma
nager.py", line 2488, in _workInIdle^@ raise self._read_content_exception[1]^@ File "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/manager
.py", line 2461, in _readContent^@ for line in content:^@ File "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/asyncExecutor.py", line 105,
in read^@ raise Exception(lfBytes2Str(err, encoding))^@exception: /bin/sh: 1: rg: not found

find key word
nnoremap a :Leaderf rg -i
nnoremap A :Leaderf rg -i --cword
xnoremap a :execute ":Leaderf rg -i --input " . GetSelectArea()
xnoremap A :execute ":Leaderf rg -i " . GetSelectArea()

cannot use
have a find windows left the origin location ,so no way to clear

@Yggdroot
Copy link
Owner

Yggdroot commented Feb 4, 2023

file "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/cli.py", line 696, in input^@ callback()^@ File "/root/.vim/plugged/LeaderF/autoload/l eaderf/python/leaderf/manager.py", line 70, in deco^@ func(self, *args, **kwargs)^@ File "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/ma nager.py", line 2488, in _workInIdle^@ raise self._read_content_exception[1]^@ File "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/manager .py", line 2461, in _readContent^@ for line in content:^@ File "/root/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/asyncExecutor.py", line 105, in read^@ raise Exception(lfBytes2Str(err, encoding))^@exception: /bin/sh: 1: rg: not found

find key word nnoremap a :Leaderf rg -i nnoremap A :Leaderf rg -i --cword xnoremap a :execute ":Leaderf rg -i --input " . GetSelectArea() xnoremap A :execute ":Leaderf rg -i " . GetSelectArea()

cannot use have a find windows left the origin location ,so no way to clear

Please install rg first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants