Use properties lexer for Scala Steward HOCON snippets#12
Merged
Conversation
Pygments has no HOCON lexer, so the blocks rendered as plain text. The properties lexer is the closest fit (key = value, quoted strings) and gives reasonable highlighting without a custom lexer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
In the meantime, I'll see if I can submit HOCON support to Pygments... |
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.
Summary
```hocon, but Pygments has no HOCON lexer, so they fell back to plainlanguage-textwith no highlighting.```propertiesgives the closest available highlighting (key,=, quoted strings) without needing a custom lexer.{/}/[/]as structural braces, but it's a clear improvement over no highlighting.Test plan
uv run --with zensical zensical buildsucceedssite/index.htmlshowslanguage-propertieswith Pygments token spans on the Scala Steward blocksdiff <(sed '1,/^---$/d' docs/index.md) README.mdis clean (files in sync)🤖 Generated with Claude Code