有什么方法可以让 node_modules 文件夹在 cmd+单击 vscode 中的代码时不会不必要地扩展?

Is there any way that node_modules folder do not expand unecessarily when cmd+click on code in vscode?

当我执行 cmd+click 代码中的某些内容时,node_modules 文件夹会展开,为了关闭它需要一直回到那个非常 [=14] 的文件夹的顶部=] 有办法避免这种情况吗?

在设置中,寻找 资源管理器:自动显示

控制资源管理器在打开文件时是否应自动显示和 select 文件。

您目前已将其设置为 true,这是默认值。将值更改为 false.

使用 Control-,(逗号)调出设置,然后在过滤器中输入 reveal ex

要在文件列表中滚动到您正在编辑的文件,请右键单击该文件的选项卡,然后 select 在边栏中显示

我写了 more information on my blog.

我通常做的是隐藏侧边栏中的 node_modules..

转到:File > Preferences > Settings

搜索 files:exclude

然后用 node_modules/ 填充 Exclude pattern 然后点击 OK

这样,我就不需要关闭自动显示功能