From dee77a7c72abf9af6e0cd4241b4ff6a5a5038041 Mon Sep 17 00:00:00 2001 From: David Neumann Date: Tue, 28 Jul 2026 17:03:27 +0200 Subject: [PATCH] Made the Visual Studio Code Configuration Sharable Added the Workspace Config+ extension by Swellaby, which allows developers to share Visual Studio Code configuration as `.shared.json` files and each developer may add custom `.local.json` files. The extension automatically merges the shared and local files. This way core configuration settings can be shared and each developer may make local changes to these settings without overriding other's settings. I deleted the original `.vscode/settings.json` and replaced it with a shared version (`.vsocde/settings.shared.json`). I removed the file nesting and the VSCode Icons configuration from it, because it is not something that is not something all developers may want to have. These configuration settings now live in my personal `.vscode/settings.local.json` settings. Also, the Workspace Config+ extension was added to the `.vscode/extensions.json`, so that it gets recommended to all developers working on the project. Since the Visual Studio Code settings still contained a branch protection for `staging`, which is now called `development`, the branch was corrected also. --- .gitignore | 6 ++-- .vscode/extensions.json | 3 ++ .../{settings.json => settings.shared.json} | 30 +------------------ dprint.json | 8 +++-- tests/linters/.cspell.json | 1 + 5 files changed, 14 insertions(+), 34 deletions(-) rename .vscode/{settings.json => settings.shared.json} (68%) diff --git a/.gitignore b/.gitignore index f49b6f7..e796a73 100644 --- a/.gitignore +++ b/.gitignore @@ -11,9 +11,9 @@ Thumbs.db .settings/ .vscode/* !.vscode/extensions.json -!.vscode/launch.json -!.vscode/settings.json -!.vscode/tasks.json +!.vscode/launch.shared.json +!.vscode/settings.shared.json +!.vscode/tasks.shared.json *.launch *.sublime-workspace /.idea diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c1d11f1..37471d4 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,6 +13,9 @@ // Integrates the dprint code formatter into the editor "dprint.dprint", + // Enables us to have a shared Visual Studio configuration, while allowing each user to locally add or overwrite settings + "Swellaby.workspace-config-plus", + // Adds useful features for editing Markdown tables "TakumiI.markdowntable", diff --git a/.vscode/settings.json b/.vscode/settings.shared.json similarity index 68% rename from .vscode/settings.json rename to .vscode/settings.shared.json index ace795b..747ae06 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.shared.json @@ -31,21 +31,11 @@ "**/obj": true, }, - // Configures the nesting of files that belong together in the explorer (the nested files are not expanded by default); this configuration nests - // all Node.js-related configuration files under the "package.json" file, and all linter and code formatter configuration files under the - // ".editorconfig" file - "explorer.fileNesting.enabled": true, - "explorer.fileNesting.expand": false, - "explorer.fileNesting.patterns": { - ".editorconfig": ".gitattributes, .gitignore, dprint.json", - "README.md": "CHANGELOG.md, CONTRIBUTORS.md, LICENSE, TODO.md", - }, - // Specifies which Git branches are protected in this repository, Visual Studio will prevent users from committing to these branches (this only // works for the commit feature that is built into Visual Studio Code and not in the terminal) "git.branchProtection": [ "main", - "staging", + "development", ], // Specifies that Visual Studio Code should always open the merge editor when a file is opened that has conflicts, instead of the code editor @@ -91,22 +81,4 @@ "https://schemastore.azurewebsites.net/": true, "https://www.schemastore.org/": true, }, - - // Configures the icon theme to be VSCode Icons and adapts the icons of certain files and directories for the VSCode Icons plugin - "workbench.iconTheme": "vscode-icons", - "vsicons.associations.files": [ - { "icon": "dal", "extensions": ["CHANGELOG.md"], "filename": true, "format": "svg" }, - { "icon": "docz", "extensions": ["README.md"], "filename": true, "format": "svg" }, - { "icon": "janet", "extensions": ["CONTRIBUTORS.md"], "filename": true, "format": "svg" }, - { "icon": "todo", "extensions": ["TODO.md"], "filename": true, "format": "svg" }, - { "icon": "vscode", "extensions": [".vscode/extensions.json", ".vscode/settings.json"], "filename": true, "format": "svg" }, - ], - "vsicons.associations.folders": [ - { "icon": "app", "extensions": ["sample-app"], "format": "svg" }, - { "icon": "cli", "extensions": ["clinet-core"], "format": "svg" }, - { "icon": "coverage", "extensions": ["linters"], "format": "svg" }, - { "icon": "github", "extensions": ["workflows"], "format": "svg" }, - { "icon": "template", "extensions": ["design"], "format": "svg" }, - { "icon": "test", "extensions": ["unit-tests"], "format": "svg" }, - ], } diff --git a/dprint.json b/dprint.json index cf5d9a5..87718a2 100644 --- a/dprint.json +++ b/dprint.json @@ -26,8 +26,12 @@ "jsonTrailingCommaFiles": [ ".cspell.json", ".vscode/extensions.json", - ".vscode/settings.json", - ".vscode/tasks.json", + ".vscode/launch.local.json", + ".vscode/launch.shared.json", + ".vscode/settings.local.json", + ".vscode/settings.shared.json", + ".vscode/tasks.local.json", + ".vscode/tasks.shared.json", "dprint.json", ], }, diff --git a/tests/linters/.cspell.json b/tests/linters/.cspell.json index cd1d69c..b4d21ea 100644 --- a/tests/linters/.cspell.json +++ b/tests/linters/.cspell.json @@ -89,6 +89,7 @@ "markdowntable", "Neumann", "slnx", + "Swellaby", "Takumi", "unreviewed", "vsicons",