Skip to content

fix: resolve treesitter overlay conflict and improve highlight links#60

Merged
barrettruth merged 1 commit intomainfrom
fix/highlights
Apr 5, 2026
Merged

fix: resolve treesitter overlay conflict and improve highlight links#60
barrettruth merged 1 commit intomainfrom
fix/highlights

Conversation

@barrettruth
Copy link
Copy Markdown
Owner

Summary

  • Treesitter conflict fix: Replace line_hl_group-only extmarks on compose comment block with inline hl_group + line_hl_group at priority 150. This overrides treesitter's @comment captures (priority 100) while yielding to metadata extmarks (priority 200).
  • Restore ForgeComposeComment = 'Comment': The { italic = true } workaround is no longer needed now that the inline highlight properly overrides treesitter.
  • Improve log highlight links: Switch ForgeLogError and ForgeLogWarning from DiagnosticVirtualTextError/DiagnosticVirtualTextWarn to DiagnosticError/DiagnosticWarn — the VirtualText variants carry a background tint that looks odd as line highlights.

Closes #58

Test plan

  • All 165 tests pass
  • Open a PR/issue compose buffer — verify comment block uses Comment highlight, metadata labels override it
  • Verify no treesitter artifacts in the <!-- ... --> block
  • Open CI log viewer — verify error/warning lines use proper highlight without VirtualText bg tint

Use inline hl_group at priority 150 for compose comment block instead
of line_hl_group alone. This overrides treesitter's @comment captures
(priority 100) while still yielding to metadata extmarks (priority 200).
Restore ForgeComposeComment = Comment now that the conflict is resolved.

Switch ForgeLogError and ForgeLogWarning from DiagnosticVirtualText
variants to DiagnosticError/DiagnosticWarn — the VirtualText groups
carry a background tint that looks odd as line highlights.

Closes #58
@barrettruth barrettruth merged commit a37e518 into main Apr 5, 2026
7 checks passed
@barrettruth barrettruth deleted the fix/highlights branch April 5, 2026 04:19
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.

fix: highlight definitions and treesitter compose conflict

1 participant