vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Colorize files/folders based on .gitignore

Open TheColorRed opened this issue 10 years ago • 4 comments

It would be nice if the files/folders text was colorized within the file tree based on the .gitignore files.

For example:

Blue  = File Updated
Green = File Added
Gray  = File Ignored

Here is an example that shows added files and ignored files:

git file highlight

TheColorRed avatar Dec 07 '15 22:12 TheColorRed

+1

choidamdam avatar Jan 12 '16 01:01 choidamdam

+1; I found this issue because I was hoping to just set arbitrary colors/styles on folders/files, including those related to .gitignore.

To expand on @TheColorRed's example:

Folders => bold

Folder `node_modules` & children => npm logo red
Folder `controllers` & children => blue
Folder `models` & children => green
Folder `views` & children => gold

Files in root, folder `dist` & children, specified by `.gitignore` => light grey

git file updated => blue underline
git file added => green underline

I envisioned a place to put our own styles, explorer.css or something:

.folder, .file {
    color: inherit; /* Assuming tree has them nested in DOM */
}
.folder {
    font-weight: bold;
}
.folder[data-name="node_modules"] {
    color: #CB3837;
}
.file.project-root, .git-ignored, .folder[data-name="dist"] {
    color: lightgrey;
}
.git-added {
    text-decoration: underline;
    text-decoration-color: green; /* not supported yet, workaround/hack not relevant */
}
/* etc. */

OlsonDev avatar Feb 12 '16 10:02 OlsonDev

+1

timc13 avatar Mar 10 '16 06:03 timc13

Duplicate of https://github.com/Microsoft/vscode/issues/178

Tyriar avatar Mar 12 '16 04:03 Tyriar