feat: v0.2–v0.5 — decorations, completions, hover, commands, status bar - #4
Merged
Conversation
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viahexfield.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 (
HoverProviderscoped tohexfield-markdown)est:90m→ "1h 30m",est:1.5h→ "1h 30m"hexfield-deck.projectsProject tag autocomplete (via
HexfieldCompletionService— see below)Typing
#in a Hexfield planner file offers completions from two sources: project names inhexfield-deck.projectsconfig, and tags already used in the current document. Partial input is replaced, not appended.v0.4 — Commands & snippets
Hexfield: Insert DateOpens 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 TodayScrolls 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-markdownfiles)hfmhfdhftestest:with an inline preset choice listphi/pme/plov0.5 — Status bar
When a Hexfield planner file is active, a summary appears in the right status bar:
Updates within 500ms of edits. Hides automatically when a non-Hexfield file is focused.
Completion provider architecture (supersedes PR #3)
Introduces a
HexfieldCompletionServicelayer between VS Code'sCompletionItemProviderinterface and individual per-token providers:src/completions/completionService.ts— definesHexfieldSubProviderinterface 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
HexfieldSubProviderand adding one line inextension.ts. No other changes needed.PR #3 is superseded by this PR — all of its logic is preserved in
ProjectTagProvider.Test plan
Setup
.vsix)examples/weekly-planner.md— confirm it activates ashexfield-markdown(check the language indicator in the status bar bottom-right)v0.2 — Visual completeness
[x]line should render with strikethrough text and a muted gray color---block at the top of the file should have a subtle background tint distinguishing it from the task contenttype: hexfield-plannerfrom frontmatter, save; all colorization including the frontmatter tint should disappear immediatelyv0.3 — Hover tooltips
[YYYY-MM-DD]that is in the past; tooltip should say "Overdue — N days ago (Day, Month Date, Year)"est:4h; tooltip should say "4 hours"est:90m; tooltip should say "1h 30m"#deep13; tooltip should show#deep13with no extra fieldshexfield-deck.projectssettings; hover the tag; tooltip should show the colorv0.3 — Tag autocomplete
#— a completion list should appear with project names#hex(partial) — the list should filter; selecting a completion should replace#hex, not append#in a regular.mdfile (notype: hexfield-plannerfrontmatter); no Hexfield completions should appearest:or[in a Hexfield file; no completion list should appear (this is intentionally disabled for now)v0.4 — Commands
Ctrl+Shift+P) in a Hexfield file;Hexfield: Insert Dateshould appearHexfield: Insert Date; pick an option;[YYYY-MM-DD]should be inserted at the cursorHexfield: Jump to Today; the editor should scroll to today's day heading in the weekly planner.mdfile;Hexfield:commands should not appear in the palettev0.4 — Snippets
hfmand trigger snippet (Tabor select from IntelliSense); frontmatter block should expand with tab stopshfd; day section heading should expandhft; full task line should expand with all token placeholdersestand select the snippet; should expand with an inline choice list for the valuev0.5 — Status bar
weekly-planner.mdopen, a task summary should appear in the bottom-right status bar[ ]to[x]; within 500ms the open count should decrease