Skip to content

Conversation

@bioball
Copy link
Member

@bioball bioball commented Dec 24, 2025

This adds syntax highlighting of Pkl code!

It adds highlighting for:

This uses the lexer for highlighting. It will highlight strings, numbers, keywords, but doesn't understand how to highlight nodes like types, function params, etc.
The reason for this is because a single line of code by itself may not be grammatically valid.

Sample screenshots:

Screenshot 2025-12-23 at 10 32 37 PM Screenshot 2025-12-23 at 10 39 10 PM

@bioball bioball force-pushed the syntax-highlighting branch from ddb4e0a to 56b8607 Compare December 25, 2025 05:24
Copy link
Contributor

@stackoverflow stackoverflow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bioball bioball merged commit 6b9c670 into apple:main Jan 6, 2026
17 checks passed
@bioball bioball deleted the syntax-highlighting branch January 6, 2026 18:33
@bioball bioball added this to the Pkl 0.31.0 milestone Jan 8, 2026
@bioball bioball removed this from Pkl Roadmap Jan 8, 2026
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.

3 participants