ecosse3 / nvim

A non-minimal Neovim config built to work most efficiently with Frontend Development
GNU General Public License v3.0
1.21k stars 109 forks source link

How can I remove node_modules from search <S - pf> ? #87

Closed hitfm00 closed 2 years ago

hitfm00 commented 2 years ago
Снимок экрана 2022-08-21 в 00 35 01
ecosse3 commented 2 years ago

By default, if you use any find files picker (via <S-P> or <Leader-pf>) it will fall back to git files if a git repo is found. If not it will fall back to find files that don't have any default ignored directories/files and it will search inside __node_modules__.

You can see in telescope wiki how to ignore specific dirs here: https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes#file-and-text-search-in-hidden-files-and-directories

Ecovim function project_files also accepts optional opts so you can configure it here.

hitfm00 commented 2 years ago

By default, if you use any find files picker (via <S-P> or <Leader-pf>) it will fall back to git files if a git repo is found. If not it will fall back to find files that don't have any default ignored directories/files and it will search inside node_modules.

You can see in telescope wiki how to ignore specific dirs here: https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes#file-and-text-search-in-hidden-files-and-directories

Ecovim function project_files also accepts optional opts so you can configure it here.

Снимок экрана 2022-08-21 в 22 49 55

I have a problem with git, the .git folder is present, but for some reason after executing <Leader-gs> for example, it gives such an error, although it picks up my repository in a regular console and everything is fine displayed with the git status command And I think if solve this problem, then the problem with node_modules will be solved

ecosse3 commented 2 years ago

Maybe it's somehow related to your local git configuration? Check if your root directory (via :pwd) is in git repository or sth like that. Maybe run git init in repo again. Not sure how I can help you with that information. It's a error from telescope repo.

hitfm00 commented 2 years ago

git config --global --add safe.directory /Users/maxim/Documents/NewLife/popcornLife This command fixed my problem with is not a git directory and after that search removed node_modules. Thx.