This question concerns telescope in vim. I can see any info as to the type of regex being used.
With the following setting I can achieve to ignore node_modules only if I start the explorer at the root level where node_modules exist.
telescope.nvim.vim
lua << EOF
require('telescope').setup{
...
file_ignore_patterns = {"node_modules"},
...
}
EOF
How can I achieve the outcome where node_modules is ignored recursively - so ignore any deeply nested node_modules. "node_modules/*" is not working. Unless I can make telescope respect .gitignore would also be a solution.
Thank you in advance for helping.
From the documentation here, it looks like you can use
%as a wildcard as well as*. I was able to exclude image files in this way:I've also been able to get this working:
If you're still having problems, the
git_filesbuiltin supports.gitignoreout of the box, so use:Telescope git_filesinstead of:Telescope find_filesif you're in a git repo.Finally, you can set the
find_commandoption in the Telescope setup, so if you're using something likeripgrepyou could tell it to ignore node_modules from there.