File colors
Color, bold, italicize, dim or underline files and folders by path, and choose which folders start open, so the parts of a change you care about stand out.
In a large pull request, some parts matter more to you than others — the project you own, a shared library everyone depends on, generated files you never read. Coloring rules make them stand out in the file tree and on the diagram: a rule gives every file or folder its paths match a text color, a background, bold, italic, a line under or through its name, or dims it — and it can open or close the folders it matches when the file tree opens.
Writing a rule
A rule lists one or more paths and the style they get:
{
"version": 1,
"rules": [
{ "paths": ["**/*.WebJobs.*/"], "background": "blue", "bold": true },
{ "paths": ["src/Mantish.Common/"], "background": "red" },
{ "paths": ["**/package-lock.json", "**/*.lock"], "dim": true },
{ "paths": ["legacy/"], "effect": "underwaved", "effectColor": "red" },
{ "paths": [".claude/", "**/generated/"], "collapsed": true }
]
}
| Field | What it does |
|---|---|
paths | The files and folders the rule styles — at least one |
text | The name's color — a named color or one of your own |
background | The row's color — a named color or one of your own |
bold | Bold name |
italic | Italic name |
dim | Greys the row out — for files you rarely need to read |
effect | A line on the name — see Effects |
effectColor | The effect's color; without one it takes the name's |
collapsed | true starts the folder closed, false open |
enabled | false switches the rule off without deleting it |
The named colors are red, orange, yellow, green, teal, blue, purple and gray. Each theme draws them in its own shades, so they stay readable in light and dark mode; you can tune them in the theme editor, under File colors.
When none of them is right, use a color of your own: #3b82f6, or with transparency #3b82f640 or rgba(59, 130, 246, 0.25). A color of your own is drawn exactly as written in every theme — a translucent background usually reads well in both. In the settings, the last swatch of a rule opens a picker with the color, its opacity and its value.
Paths use the same patterns as the ignore files: ** crosses folders, * and ? do not, and a pattern is matched against the whole path. A path ending in / names a folder — it styles the folder and everything inside it.
Effects
The effects are the ones JetBrains IDEs draw in a color scheme — one per rule:
effect | Draws |
|---|---|
underscored | A thin line under the name |
boldUnderscored | A thick line under the name |
underwaved | A wavy line under the name |
bordered | A box around the name |
strikeout | A line through the name |
dottedLine | A thick dotted line under it |
JetBrains' Faded is dim, which goes with any effect. effectColor takes the same colors as text; leave it out and the line is drawn in the name's own color. A file you write by hand may spell an effect in any case, with spaces or hyphens — "Bold underscored" is read as boldUnderscored.
Folders that start open or closed
"collapsed": true closes a folder the rule matches when the file tree opens — the .claude/ folder you never review, generated code — and "collapsed": false opens it even when Settings › File tree › Folders start is set to Collapsed. Leave it out to follow that setting. A rule speaks for the folders its paths match, not for the folders inside them, and only folders open and close: on a rule that names only files it does nothing.
Whatever you open or close by hand wins until you open another pull request, and the folders of the file you open always open. Unlike colors, folders open and close as the rules say even while file colors are switched off.
Which rule wins
Rules are read from three files, highest priority first:
| File | Who it is for |
|---|---|
.mantish/tree-rules.local.json in the repository | You, in this repository only |
.mantish/tree-rules.json in the repository | Your team — commit it like any other file |
~/.mantish/tree-rules.json on your computer | You, in every repository |
On Windows the last one is in %LOCALAPPDATA%\Mantish; set MANTISH_HOME to keep it somewhere else.
Within a file, the rule nearer the top wins. When several rules match one file, Mantish merges them by default: each part of the style — text color, background, bold, italic, dim, effect — comes from the highest rule that sets it. An effect keeps its own color: a lower rule's effectColor never lands on a higher rule's effect. Switch When several rules match to First rule wins to let the highest matching rule decide the whole look on its own.
Your local file is kept out of git: when Mantish writes it, it adds it to .mantish/.gitignore unless git already ignores it.
Where to edit
Open Settings › File tree › Coloring rules. Each of the three files is listed with its rules in order:
- + Rule adds a rule to one of your own files; click a rule to change its paths and style. The editor lists what the rule matches in the pull request you have open.
- Drag a rule by its handle — or focus the handle and press ↑ / ↓ — to change its priority.
- Copy as file copies your rules in the file's format, ready to paste into
.mantish/tree-rules.jsonand commit for your team. - The team's file is shown read-only. Change it in your editor and commit it.
You can edit any of the files by hand, too — Mantish picks up the change when you come back to the app.
| App | Where |
|---|---|
| Desktop app and VS Code | Settings › File tree › Coloring rules, and the files |
| Terminal | Not available yet |
| JetBrains | In development |
In the file tree
Right-click a file or folder to see which rules style it, in priority order, and the file each one comes from. Choosing a rule opens it in the settings. Manage coloring rules… opens the list.
File colors in the view options (the ⚙ above the file tree) turns the colors off and on — handy when you want the plain list for a moment. Show File Colors in the command palette does the same.