Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I prevent vscode from creating workspace files such as ".vscode/settings.json"?

Whenever I open a new folder to edit some code (code .), opening the settings dialog (+,) immediately creates a directory .vscode with a mostly empty file settings.json.

Since there are no workspace-specific settings, the file looks like:

{
}

For the time being, I do not want to have .vscode directories spread across my filesystem. I am happy with global settings.

Is there a way to disable this behavior and prevent Visual Studio Code from creating these files automatically?

like image 764
Rodolfo Carvalho Avatar asked May 19 '18 22:05

Rodolfo Carvalho


People also ask

How do I remove settings JSON from VS Code?

You can open the settings.json file with the Preferences: Open Settings (JSON) command in the Command Palette (Ctrl+Shift+P). Once the file is open in an editor, delete everything between the two curly braces {} , save the file, and VS Code will go back to using the default values.

How do I disable VS Code workspace trust?

Command-line switch# You can disable Workspace Trust via the VS Code command line by passing --disable-workspace-trust .

Where are VS Code workspace settings stored?

The workspace settings file is located under the . vscode folder in your project.


1 Answers

Currently this isn't an option, but it is an open issue (see here). This post also contains some work-arounds for git projects.

like image 91
he77kat_ Avatar answered Oct 01 '22 05:10

he77kat_