Improve built-in theme pipeline/format#314
Merged
jmacdonald merged 26 commits intomainfrom May 3, 2026
Merged
Conversation
This includes theme test fixtures to decouple the test suite from user themes living in ~/.config. It also adds test coverage to ensure user themes are loaded.
Extract syntax loading logic into a discrete type, since it's getting more complex and is harder to test when embedded in the application type.
jmacdonald
commented
May 3, 2026
Comment on lines
+133
to
+134
| assert!(rendered.contains("<key>fontStyle</key>")); | ||
| assert!(rendered.contains("<string></string>")); |
Owner
Author
There was a problem hiding this comment.
This seems like a weak verification.
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.
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
syntectdependency still uses the older.tmThemeformat. 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.tmThemefiles 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.