Skip to content

Add hash-pipe semantic highlighting, make validation live - #1084

Draft
vezwork wants to merge 1 commit into
mainfrom
feature/hash-pipe-highlighting
Draft

Add hash-pipe semantic highlighting, make validation live#1084
vezwork wants to merge 1 commit into
mainfrom
feature/hash-pipe-highlighting

Conversation

@vezwork

@vezwork vezwork commented Aug 11, 2026

Copy link
Copy Markdown
Member

Fixes #409

Screenshot 2026-08-11 at 4 56 41 PM
  • Adds semantic highlighting for hash-pipe comments in code blocks
  • Yaml validation already existed, but makes it so yaml validation (in both frontmatter and in hash-pipe comments) happens as the user types rather than on-save.

Design considerations

  • According to an LLM, the yaml frontmatter highlighting in qmd files is done by "declarative grammar delegation". This approach is ideal because it delegates highlighting of the yaml in frontmatters to the yaml textmate grammar in VSCode (so its consistent with how yaml would be highlight in a .yaml file). I would've liked to use this approach for hash-pipe comments, but it does not sound like it possible, since the hash-pipe comments break up the yaml and it sounds like delegation requires a contiguous block of yaml.

TODO

  • test in VSCode
  • test in Positron

@posit-snyk-bot

posit-snyk-bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@vezwork
vezwork marked this pull request as draft August 11, 2026 20:56
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.

Add VS Code support to distinguish hash pipe comments from regular comments

2 participants