Skip to content

Improve built-in theme pipeline/format#314

Merged
jmacdonald merged 26 commits intomainfrom
themes-simple
May 3, 2026
Merged

Improve built-in theme pipeline/format#314
jmacdonald merged 26 commits intomainfrom
themes-simple

Conversation

@jmacdonald
Copy link
Copy Markdown
Owner

With built-in syntax definitions having recently landed (see 7d979eb), this PR updates built-in themes to follow a similar convention. The eventual goal is to expand the set of themes offered out of the box; these changes facilitate that eventual work.

Unfortunately, the syntect dependency still uses the older .tmTheme format. As the number of built-in themes grows, having a more concise format that covers Amp's specific use cases and is easier to maintain becomes important. To that end, a large portion of this PR is focused on introducing a YAML-based theme format, along with a minimal compiler to convert those into syntect-compatible .tmTheme files during the build process.

To help create and maintain built-in themes, a skill has been added to create/update them based on popular color palettes (e.g. monokai, solarized), which was used to generate a new monokai-extended theme using the new YAML theme format.

Outside of that, user syntax and theme loading have been updated to avoid creating these directories when they don't already exist, making Amp more compatible with read-only configuration directories used by tools like Home Manager.

@jmacdonald jmacdonald self-assigned this May 2, 2026
Comment thread tests/theme_compiler.rs Outdated
Comment on lines +133 to +134
assert!(rendered.contains("<key>fontStyle</key>"));
assert!(rendered.contains("<string></string>"));
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

This seems like a weak verification.

@jmacdonald jmacdonald merged commit 87c069d into main May 3, 2026
1 check passed
@jmacdonald jmacdonald deleted the themes-simple branch May 3, 2026 19:26
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.

1 participant