Skip to content
Prev Previous commit
Next Next commit
VS Code: Name the line that keeps settings managed
The installer only checks the first line, but the header, docs and README
said to remove "the managed comments" without saying which.
  • Loading branch information
manzoorwanijk committed Oct 5, 2026
commit 21bb2f5fe5b4f7988e1989dcde336828b162a326
4 changes: 2 additions & 2 deletions .vscode/settings.dist.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is a managed VS Code settings file.
// It is copied into place by `tools/monorepo/scripts/install-vscode-settings.mts`.
// If you no longer want the settings managed, remove these comments.
// While the first line is present, opening the folder replaces this file with `.vscode/settings.dist.jsonc`.
// To customize these settings and keep your changes, delete the first line.
{
// Define schema to allow auto-completion.
"$schema": "vscode://schemas/settings/workspace",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ We recommend configuring your editor to automatically check for syntax and lint

If you use Visual Studio Code, the repository ships a managed workspace configuration so the editor uses the same linting, formatting, PHP, and TypeScript tooling as the Gutenberg repository. The first time you open the folder, VS Code prompts you to install the [recommended extensions](https://github.com/WordPress/gutenberg/blob/HEAD/.vscode/extensions.json) and to allow an automatic task that copies [`.vscode/settings.dist.jsonc`](https://github.com/WordPress/gutenberg/blob/HEAD/.vscode/settings.dist.jsonc) to `.vscode/settings.json`. Allow both and you're set up.

The installer replaces `settings.json` whenever it still starts with the managed comments, so edits made there are lost when the template changes. To keep your own settings, remove those comments; the installer then leaves the file alone. You can re-run it at any time from the Command Palette via **Tasks: Run Task → Install VS Code settings**.
The installer replaces `settings.json` whenever its first line is `// This is a managed VS Code settings file.`, so edits made there are lost when the template changes. To keep your own settings, delete that line; the installer then leaves the file alone. You can re-run it at any time from the Command Palette via **Tasks: Run Task → Install VS Code settings**.
Comment thread
manzoorwanijk marked this conversation as resolved.
Outdated

The settings point the TypeScript, ESLint, Prettier, and Stylelint extensions at the workspaces that install them, because those tools are not installed in the root `node_modules`. If you maintain your own settings, copy those paths from the template.

Expand Down
2 changes: 1 addition & 1 deletion tools/monorepo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See the TypeScript section of [`packages/README.md`](../../packages/README.md) f

## VS Code settings

`npm run --workspace @wordpress/monorepo-tools install-vscode-settings` copies `.vscode/settings.dist.jsonc` to `.vscode/settings.json`, unless that file no longer starts with the managed comments. A VS Code task runs it when the folder opens.
`npm run --workspace @wordpress/monorepo-tools install-vscode-settings` copies `.vscode/settings.dist.jsonc` to `.vscode/settings.json`, unless that file no longer starts with `// This is a managed VS Code settings file.` A VS Code task runs it when the folder opens.

## Admin design tokens experiment

Expand Down
Loading