Colour files by project in the Explorer, Open Editors and tabs

A fair question about the custom list: what does it buy over the built-in
Open Editors view? Most of the answer was the project colours — and those do
not need a custom view. A FileDecorationProvider puts them on the built-in
Open Editors view, the Explorer and the tabs, which keeps everything native
that view already does, including the drag-to-dock this list cannot offer.

verticalTabs.decorateFiles is off / color / colorAndBadge, defaulting to
color. Badges are the two characters a FileDecoration allows, taken from the
first and last segments of the project name so that Acme.Shop.Client and
Acme.Shop.Server read as AC and AS rather than colliding.

Two limits are documented rather than papered over: there is no way to
decorate only the Open Editors view, so the Explorer is coloured too; and Git
decorates modified files with only one colour winning, so a dirty file can
show Git's colour instead of its project's.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
max
2026-09-07 18:52:42 +02:00
co-authored by Claude Opus 5
parent 925e55d619
commit 2865ced2f0
5 changed files with 153 additions and 0 deletions
+15
View File
@@ -170,6 +170,21 @@
"minimum": 0,
"maximum": 8,
"description": "Width in pixels of the project colour border on the left of each row."
},
"verticalTabs.decorateFiles": {
"type": "string",
"enum": [
"off",
"color",
"colorAndBadge"
],
"enumDescriptions": [
"Do not decorate files.",
"Colour each file's name by its project.",
"Colour the name and add a short project badge, such as AC for Acme.Shop.Client."
],
"default": "color",
"markdownDescription": "Colour files by project wherever VS Code shows file decorations: the Explorer, the built-in **Open Editors** view, and the editor tabs. This is what makes the built-in Open Editors view project-coloured without giving up its drag-and-drop.\n\nThere is no way to decorate only the Open Editors view, so the Explorer is coloured too. Git also decorates modified files and only one colour wins, so a dirty file may show Git's colour instead of its project's. Requires `explorer.decorations.colors`, which is on by default."
}
}
},