Custom Color CommentInstall from the VS Code Marketplace → Color comments based on a tag right after the comment marker — inspired by
Colorful Comments, rebuilt to be fully customizable from
✨ Features
📦 InstallationSearch "Custom Color Comment" in the VS Code Extensions view, or install directly from the Marketplace. 🚀 UsageWrite a tag right after your comment marker:
🎨 Default Tags
⚙️ Custom Colors —
|
| Property | Type | Effect |
|---|---|---|
color |
string | text color (hex) |
backgroundColor |
string | background color (hex) |
backgroundOpacity |
number | background transparency, 0–1 (requires backgroundColor) |
bold |
boolean | bold text |
italic |
boolean | italic text |
lineThrough |
boolean | strikethrough |
opacity |
number | 0–1, fades the text |
error |
boolean | enable diagnostics for this tag |
errorColor |
string | "blue" = Information, "yellow" = Warning, "red" = Error |
errorWarning |
boolean | create a native VS Code diagnostic and show it in Problems |
Controlling which paths are checked
Both path settings accept workspace-relative glob patterns. In a Flutter workspace, for example:
"ccComment.ignoreWarning": ["ios/**"]
This suppresses comment diagnostics for files under ios (like the
ccComment:disable-errors directive), while keeping comment colors active.
"ccComment.ignoreAggressive": ["generated/**"]
This keeps those paths out of background workspace scans, including startup and file-created rescans. Their diagnostics are checked while a file is open and cleared when it closes. An empty array leaves all paths enabled. These settings can be used independently or together.
The extension also detects common project manifests and automatically skips
generated/dependency folders for that project type. For example, Flutter
projects skip their native platform scaffolding and Dart build data, Python
projects skip caches and virtual environments, and Rust projects skip target.
These folder names are scoped to detected projects, so a directory such as
ios in an unrelated project is still scanned. Use
ccComment.ignoreAggressive for additional project-specific paths.
Set both error: true and errorWarning: true to create a VS Code diagnostic.
The whole comment text (starting at the tag, without leading whitespace) is
the diagnostic range. VS Code supplies the native squiggle and its severity
color; the extension does not draw a styled underline. Since native squiggles
come from diagnostics, they are also listed in the Problems panel. To
suppress these diagnostics for a single file, put this directive on its first
line using that language's comment syntax:
// ccComment:disable-errors
For example, use # ccComment:disable-errors in Python and
<!-- ccComment:disable-errors --> in HTML. This only suppresses diagnostics
in that file; comment colors and other styles remain active.
The extension scans supported source files across the workspace when it
starts, including files that are not currently open, except paths configured in
ccComment.ignoreAggressive. To run the scan again, click $(refresh)
Warnings in the status bar, use the refresh button on the CC Warnings
sidebar, or run ccComment: Refresh Warnings from the Command Palette. The
sidebar groups diagnostics by configured tag in severity order (red errors,
blue information, then yellow warnings); selecting an entry opens the file at
that comment. Creating or deleting supported files triggers a rescan, so
removed files no longer leave stale warning counts. Git diff documents are
ignored to avoid reporting the same file twice. The scan and automatic
file-created rescans skip common build folders and project-type-specific
generated or dependency folders, so build output does not repeatedly trigger
workspace scans. Deleted files have their diagnostics removed directly without
rescanning the workspace.
- Your entries merge on top of the defaults (yours win on conflicts). Set
"ccComment.disableDefaultTags": trueto use only your own tags. - Letter tags (like
TODO) match as a whole word, soTODOINGwon't falsely trigger. - Symbol tags (
!,?,*) match right after the comment marker, with or without a space://!and// !both work. - Tags that repeat the comment marker itself (like
////) are matched from the true start of the comment, so a 4-slash line is only caught by////, not accidentally by a 2- or 3-slash rule.
