Skip to content

feat: v0.2–v0.5 — decorations, completions, hover, commands, status bar - #4

Merged
jimblom merged 7 commits into
mainfrom
feature/roadmap-v02-v05
Mar 13, 2026
Merged

feat: v0.2–v0.5 — decorations, completions, hover, commands, status bar#4
jimblom merged 7 commits into
mainfrom
feature/roadmap-v02-v05

Conversation

@jimblom

@jimblom jimblom commented Mar 12, 2026

Copy link
Copy Markdown
Owner

What's in this PR

Implements roadmap milestones v0.2 through v0.5, plus a structured completion provider architecture that supersedes PR #3.


v0.2 — Visual completeness

Done-task strikethrough
[x] task lines now render with strikethrough and a muted foreground color. Configurable via hexfield.colors.doneTask (default #6B737C). The decoration covers the full task line so completed work visually recedes without relying on color alone.

Frontmatter block highlight
The YAML frontmatter block receives a subtle background tint across all its lines, making the metadata section visually distinct from task content.


v0.3 — Editor intelligence

Hover tooltips (HoverProvider scoped to hexfield-markdown)

  • Due dates — human-readable proximity: "3 days overdue (Tuesday, Feb 10)", "Due today", "Due in 5 days — Friday, March 12"
  • Time estimates — expanded form: est:90m"1h 30m", est:1.5h"1h 30m"
  • Project tags — shows color and a clickable URL link if defined in hexfield-deck.projects

Project tag autocomplete (via HexfieldCompletionService — see below)
Typing # in a Hexfield planner file offers completions from two sources: project names in hexfield-deck.projects config, and tags already used in the current document. Partial input is replaced, not appended.


v0.4 — Commands & snippets

Hexfield: Insert Date
Opens a quick-pick menu with preset options (today, tomorrow, end of week, next Monday, 1 week, 2 weeks, 1 month) and inserts [YYYY-MM-DD] at the cursor. Only visible in the command palette when a Hexfield file is active.

Hexfield: Jump to Today
Scrolls to the day-section heading that matches today's day name. Falls back to a message if no matching heading is found.

Snippet pack (active in hexfield-markdown files)

Prefix Expands to
hfm Full frontmatter block for a new planner file
hfd Day section heading with a starter task
hft Full task line with all token slots
est est: with an inline preset choice list
phi / pme / plo Priority HIGH / MED / LOW markers

v0.5 — Status bar

When a Hexfield planner file is active, a summary appears in the right status bar:

⚠ 2 overdue  ↻ 3 active  ○ 8 open

Updates within 500ms of edits. Hides automatically when a non-Hexfield file is focused.


Completion provider architecture (supersedes PR #3)

Introduces a HexfieldCompletionService layer between VS Code's CompletionItemProvider interface and individual per-token providers:

  • src/completions/completionService.ts — defines HexfieldSubProvider interface and the service, which registers once and fans out to all active providers. Trigger characters are derived automatically.
  • src/completions/providers/projectTagProvider.ts — the only active provider; incorporates PR Claude/language specific suggestions rh pxb #3's replace-range logic.

Adding a new token type (estimates, checkboxes, dates) means implementing HexfieldSubProvider and adding one line in extension.ts. No other changes needed.

PR #3 is superseded by this PR — all of its logic is preserved in ProjectTagProvider.


Test plan

Setup

  • Open VS Code with this branch installed (F5 from the repo, or install the .vsix)
  • Open examples/weekly-planner.md — confirm it activates as hexfield-markdown (check the language indicator in the status bar bottom-right)

v0.2 — Visual completeness

  • Done-task strikethrough — any [x] line should render with strikethrough text and a muted gray color
  • Frontmatter highlight — the --- block at the top of the file should have a subtle background tint distinguishing it from the task content
  • Demotion clears decorations — remove type: hexfield-planner from frontmatter, save; all colorization including the frontmatter tint should disappear immediately

v0.3 — Hover tooltips

  • Overdue date — hover over a [YYYY-MM-DD] that is in the past; tooltip should say "Overdue — N days ago (Day, Month Date, Year)"
  • Future date — hover over a future date; should say "Due in N days — ..."
  • Today's date — hover over today's date; should say "Due today"
  • Time estimate — hover over est:4h; tooltip should say "4 hours"
  • Estimate in minutes — hover over est:90m; tooltip should say "1h 30m"
  • Project tag (no config) — hover over #deep13; tooltip should show #deep13 with no extra fields
  • Project tag (with config) — add a project with a color to hexfield-deck.projects settings; hover the tag; tooltip should show the color

v0.3 — Tag autocomplete

  • On a task line, type # — a completion list should appear with project names
  • Type #hex (partial) — the list should filter; selecting a completion should replace #hex, not append
  • No spurious completions — type # in a regular .md file (no type: hexfield-planner frontmatter); no Hexfield completions should appear
  • No completions for other tokens — type est: or [ in a Hexfield file; no completion list should appear (this is intentionally disabled for now)

v0.4 — Commands

  • Open command palette (Ctrl+Shift+P) in a Hexfield file; Hexfield: Insert Date should appear
  • Run Hexfield: Insert Date; pick an option; [YYYY-MM-DD] should be inserted at the cursor
  • Run Hexfield: Jump to Today; the editor should scroll to today's day heading in the weekly planner
  • Command palette scoping — open a regular .md file; Hexfield: commands should not appear in the palette

v0.4 — Snippets

  • In a Hexfield file, type hfm and trigger snippet (Tab or select from IntelliSense); frontmatter block should expand with tab stops
  • Type hfd; day section heading should expand
  • Type hft; full task line should expand with all token placeholders
  • Type est and select the snippet; should expand with an inline choice list for the value

v0.5 — Status bar

  • With weekly-planner.md open, a task summary should appear in the bottom-right status bar
  • Overdue count, active count, and open count should reflect the file contents
  • Edit a [ ] to [x]; within 500ms the open count should decrease
  • Switch to a non-Hexfield file; the status bar item should disappear
  • Switch back; it should reappear

jimblom and others added 2 commits March 8, 2026 06:55
…s, status bar

v0.2 — Visual completeness
- [x] task lines now render with strikethrough and a muted foreground color;
  configurable via hexfield.colors.doneTask
- Frontmatter block gets a subtle background tint across all its lines

v0.3 — Editor intelligence
- Hover tooltips on due dates (human-readable proximity: "3 days overdue"),
  time estimates (expanded: "1h 30m"), and project tags (color + URL from config)
- Autocomplete for #project tags (from hexfield-deck.projects config + document),
  est: presets (15m → 8h), and [ ] / [/] / [x] checkbox states
  Trigger characters: #, :, [

v0.4 — Commands & snippets
- Hexfield: Insert Date — quick-pick menu (today, tomorrow, end of week, etc.)
  inserts [YYYY-MM-DD] at cursor; available only in hexfield-markdown files
- Hexfield: Jump to Today — scrolls to the day-section heading for today
- Snippet pack: hfm (frontmatter), hfd (day section), hft (full task),
  est (estimate with preset choice list), phi / pme / plo (priorities)

v0.5 — Status bar
- Right-side status bar item shows overdue date count, in-progress task count,
  and open task count whenever a Hexfield planner file is active

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rchitecture

Replaces the monolithic CompletionItemProvider with a structured service layer
that makes the completion system extensible without touching extension.ts.

- src/completions/completionService.ts — defines the HexfieldSubProvider
  interface and HexfieldCompletionService, which registers once with VS Code
  and fans out to all registered sub-providers. Trigger characters are derived
  automatically from the active provider set.

- src/completions/providers/projectTagProvider.ts — implements HexfieldSubProvider
  for #tag completions. Incorporates the replace-range logic from PR #3 so
  partial input is replaced rather than appended.

- Removes src/providers/completionProvider.ts (the earlier monolithic provider
  that handled tags, est:, and checkboxes in one class).

Only the ProjectTagProvider is registered. Stub comments in extension.ts mark
where EstimateProvider, CheckboxProvider, and DateProvider will plug in.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jimblom jimblom changed the title feat: v0.2–v0.5 roadmap features — decorations, intelligence, command… feat: v0.2–v0.5 — decorations, completions, hover, commands, status bar Mar 12, 2026
jimblom and others added 5 commits March 11, 2026 19:49
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds C-style line comment syntax to hexfield-markdown files. Everything from
// to end of line is treated as a comment and rendered in comment green
(#6A9955 — same as C/C++ comments in VS Code Dark+).

- Grammar: adds a line-comment rule to the inline injection grammar, listed
  first so it takes precedence over all other inline token patterns
- Decorator: adds lineComment as a static token, applied last in decorate()
  so the comment color wins over any token decorations in the same range
  (e.g. // #tag !!! all renders green, not mixed colors)
- Config: hexfield.colors.lineComment for user override

Example usage:
  - [ ] Refactor nacelle couplings est:2h  // blocked on Joel's sign-off
  - [x] Deploy to SOL bridge #hexfield     // shipped Friday

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…URLs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…endering

The bare \[/\] pattern matched anywhere in a line, including in the middle of
lines where the markdown grammar's link detection was still in play. This caused
[text](url) links on the same line as a [/] checkbox to not render correctly.

Restrict the match with a lookbehind requiring a list item marker (- * +)
immediately before [/]. The oniguruma engine (used by VS Code) supports
variable-length lookbehinds so this is safe. [/] in any other position
(e.g. inside a note, near a URL) is now left to the markdown grammar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jimblom
jimblom merged commit 1651d90 into main Mar 13, 2026
1 check passed
@jimblom
jimblom deleted the feature/roadmap-v02-v05 branch March 13, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant