Yet Another TODO Highlighter (YATH)Highlight Features
Quick start
Project configuration (
|
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
keywords |
Record<string, { foreground, background }> |
yes | — | Map of keyword → colors. Keys are matched case-insensitively, displayed uppercase |
includePattern |
string (glob) |
yes | — | Files to scan for TODOs |
excludePattern |
string (glob) |
no | "" |
Files to exclude from scanning |
debounceDelay |
number (ms) |
no | 200 |
Delay before refreshing decorations after a document change |
Hierarchical merging
When you open a file, YATH walks from that file's directory up to the
filesystem root, collecting every .todo-highlighter.json it finds. Configs are
then merged outermost → innermost:
- Scalar fields (
includePattern,excludePattern,debounceDelay) — inner values replace outer ones keywords— deep-merged. Inner entries override outer entries with the same name; unique keywords from both levels are preserved
This lets a monorepo define a baseline at the root and let individual packages add their own keywords or tweak colors locally without duplicating the shared set.
User settings (settings.json)
These control how the panel displays results. Because they're personal
preferences, they live in your VS Code user/workspace settings rather than the
shared .todo-highlighter.json.
| Setting | Type | Default | Description |
|---|---|---|---|
yath.wrap |
boolean |
false |
Wrap long TODO lines in the panel and add spacing between items |
You can edit these in settings.json directly, via the Settings UI (search for
"yath"), or with the toolbar buttons in the panel header (see below).
Panel toolbar
The YATH panel header has these buttons:
| Icon | Action |
|---|---|
| Fold | Toggle line wrap (yath.wrap) |
| Refresh | Re-scan the workspace |
Toggling line wrap from the toolbar updates your workspace settings.json, so
the choice persists across sessions.
Commands
| Command | ID | Description |
|---|---|---|
| Refresh | yath.refresh |
Re-scan the workspace for TODOs |
| Toggle Line Wrap | yath.toggleWrap |
Flip yath.wrap on/off |
All commands are available from the command palette (Cmd+Shift+P /
Ctrl+Shift+P).
Behavior notes
- Scanning runs at startup and whenever the config file changes. The sidebar always reflects the most recent scan; use Refresh to force a re-scan.
- Editor decorations update on document edits, debounced by
debounceDelay. - Switching files can change which config applies if a deeper
.todo-highlighter.jsonexists in the new file's directory tree. The panel reloads automatically when this happens.
Development
Built with TypeScript and the VS Code Webview API.
pnpm install # from the monorepo root
pnpm compile # one-shot tsc build
pnpm watch # tsc --watch
pnpm check # type-check
pnpm lint # eslint
pnpm package # build a .vsix
pnpm preflight # check + lint + compile (runs before release)
To test a local build, install the generated .vsix:
code --install-extension ./yath-X.Y.Z.vsix --force
Then run Developer: Reload Window in VS Code.
Releasing
Releases are automated via pnpm release and publish to the
Visual Studio Marketplace.
One-time setup
Register the publisher. Sign in at marketplace.visualstudio.com/manage with a Microsoft account and create the
element30publisher (the ID must match thepublisherfield inpackage.json).Generate a Personal Access Token. At dev.azure.com → User → Personal access tokens, create a token with:
- Organization: All accessible organizations
- Scopes: Custom defined → Marketplace → Manage
Save the token in the synced env folder. Add this line to
~/Sync/env/yath.env(create the file if it doesn't exist):VSCE_PAT=<paste-token-here>Link the env file into the package. From this directory:
pnpm env:linkThis creates a
.envsymlink to~/Sync/env/yath.env. The token is read from there at release time and never committed to the repo.
Per-release flow
pnpm release
This will:
- Verify the working tree is clean and you're on (or merging to)
main - Verify
VSCE_PATis loaded from.env - Run preflight (
check+lint+compile) - Prompt for a semver bump (patch / minor / major / skip)
- Verify
CHANGELOG.mdhas an entry for the new version - Commit
package.json+CHANGELOG.mdaschore(yath): release version X.Y.Z - Tag
yath-vX.Y.Z - Publish to the Marketplace via
vsce publish - Prompt to push the commit and tag to
origin
Update CHANGELOG.md before running pnpm release — the script will
abort if it can't find a section for the new version.
Requirements
VS Code 1.115.0 or later.
License
MIT