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

[RESOLVED] Not recognizing/including /node_modules #2896

Closed
rollschild opened this issue Aug 10, 2022 · 4 comments
Closed

[RESOLVED] Not recognizing/including /node_modules #2896

rollschild opened this issue Aug 10, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@rollschild
Copy link

Problem description

LunarVim doesn't seem to recognize or include the folder /node_modules in my projects.

Initially I thought it was an nvim-tree issue, since I was not able to see the /node_modules folder in the nvim-tree file explorer, no matter how I toggle between "show git ignored files"/"hide git ignored files". This is a screenshot of my nvim-tree explorer, showing all ignored files:
Screen Shot 2022-08-10 at 4 15 18 PM
As you can see, /build which is in .gitignore is correctly being displayed, but not /node_modules.

Here is my .gitignore:

/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

Here is the output of $ ls -al:
Screen Shot 2022-08-10 at 4 17 28 PM

Then I noticed that when doing telescope searching, using <leader>-f, the /node_modules folder is not included either.
Screen Shot 2022-08-10 at 4 18 49 PM

So I'm a little confused on who's responsible for this behavior, LunarVim itself, telescope, or nvim-tree? And how do I fix it? I'm sure there is something like a one-line config that can fix this but I'm not sure where to look. Thanks!

LunarVim version

master-47e4e5b

Neovim version (>= 0.7.2)

v0.7.2

Operating system/version

macOS 12.5

Steps to reproduce

No response

support info

                                         Buffer info
                                         * filetype:                typescriptreact
                                         * bufnr:                   5
                                         * treesitter status:       active
                                         
                                         Active client(s)
                                         * name:                      tsserver
                                         * id:                        1
                                         * supported filetype(s):     [javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx]
                                         * attached buffers:          5
                                         * root_dir pattern:          5
                                         * capabilities:              renameProvider                  | documentSymbolProvider | hoverProvider
                                                                      documentRangeFormattingProvider | foldingRangeProvider   | referencesProvider
                                                                      documentFormattingProvider      | implementationProvider | workspaceSymbolProvider
                                                                      documentHighlightProvider       | typeDefinitionProvider
                                                                      definitionProvider              | callsProvider
                                         
                                         Automatic LSP info
                                         * Skipped servers: [angularls, cssmodules_ls, denols, eslint, graphql, rome, stylelint_lsp, tailwindcss]
                                         
                                         Formatters info
                                         * Active: prettier  
                                         * Supported: [deno_fmt, eslint, eslint_d, prettier, prettier_d_slim, prettierd, rustywind]
                                         
                                         Linters info
                                         * Active: eslint  
                                         * Supported: [eslint, eslint_d, semgrep, tsc, xo]
                                         
                                         Code actions info
                                         * Active: 

Screenshots

No response

@rollschild rollschild added the bug Something isn't working label Aug 10, 2022
@rebuilt
Copy link
Collaborator

rebuilt commented Aug 11, 2022

The node module folder is filtered out by default. lvim.builtin.nvimtree.setup.filters.custom = { "node_modules", "\\.cache"}

Add lvim.builtin.nvimtree.setup.filters.custom = { } to your config to see everything.

@rollschild
Copy link
Author

@rebuilt This is it. Thanks a lot!

@rollschild rollschild changed the title Not recognizing/including /node_modules [RESOLVED]Not recognizing/including /node_modules Aug 11, 2022
@rollschild rollschild changed the title [RESOLVED]Not recognizing/including /node_modules [RESOLVED] Not recognizing/including /node_modules Aug 11, 2022
@Naumov1889
Copy link

also you can press U to toggle this custom filter
https://github.com/nvim-tree/nvim-tree.lua/blob/02fdc262eba188198a7deb2117b3b996e6763d65/doc/nvim-tree-lua.txt#L1511

@filiptdz
Copy link

To anyone stumbling upon this and facing the same issue I was, maybe setting nvimtree.filters.custom = { } might not work as you might need some filters of your own, you can use nvimtree.filters.exclude = { "node_modules" } to get the folder to appear again and still be able to add filters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants