4

I have typescript installed and I am using visual code.

If i try to go to definition for a typescript function located in node_modules, visual studio expands the entire 'node_modules' folder, and I have to close it again.

It is ridiculous.

How can i stop that happening

3
  • which IDE do you use, visual studio or visual studio code? Commented Jul 20, 2018 at 22:25
  • Visual code, i edited sorry my mystake Commented Jul 20, 2018 at 22:29
  • Possible duplicate of VS Code: disable linking between open files and explorer Commented Jul 20, 2018 at 22:43

1 Answer 1

6

In VSCode, if you have two options in vscode 's user settings:

  1. set explorer.autoReveal to false, will disable automatically reveal files when opening them;
  2. add "**/node_modules":true to files.exclude, will hide the node_modules folder from explore pane;
Sign up to request clarification or add additional context in comments.

2 Comments

Neither of those settings will stop the node_modules folder from expanding if you have opened a file in it
if you add "**/node_modules":true to files.exclude, then you can't see node_modules directory in the explorer pane of vscode. if it is still here, try save your settings and reload vscode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.