fix(zed): improve syntax highlighting readability + wire alt Matugen theme#86
Open
yukazakiri wants to merge 5 commits intosnowarch:mainfrom
Open
fix(zed): improve syntax highlighting readability + wire alt Matugen theme#86yukazakiri wants to merge 5 commits intosnowarch:mainfrom
yukazakiri wants to merge 5 commits intosnowarch:mainfrom
Conversation
…nfigs
- Add _render_zed_alt_theme() to render dots/.config/matugen/templates/zed-colors.json
without requiring a TTY (matugen 4.x limitation)
- Resolves all {{colors.*}} tokens from colors.json + material_colors.scss fallback
- Outputs to ~/.config/zed/themes/inir-alt-theme.json (iNiR-alt Dark/Light)
- Called automatically alongside the main Zed theme on every --zed run
Replace opaque outline borders with subtle alpha-based borders: - border: on_surface at 12% opacity (was solid outline) - border.variant: surface_std at 12% opacity (was darkened surface_low) - border.selected: on_surface at 25% opacity (was primary at 70% lightness) - border.disabled: outline_variant at 37% opacity (was darkened outline)
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
This PR improves the Zed editor theme generation to actually produce readable syntax highlighting across all Material You color palettes, and also wires up the existing
zed-colors.jsonmatugen template so the iNiR-alt Dark/Light themes automatically generate alongside the main theme.What changed in
scripts/colors/zed/theme_generator.pyprimary,secondary, andtertiarycolors end up nearly identical shades of grey. The old code used those directly for syntax tokens, making all code look like grey-on-dark with barely any contrast.term1–term6) which always has distinct hues (red, green, yellow, blue, magenta, cyan), then apply a strong saturation boost via an improvedsaturate()helper that includes an additive minimum-saturation floor for very muted inputs.mix_ratiovariable (currently0.40) blends 40% of the theme'sprimarycolor into each syntax color — easy to tune, makes the whole thing feel cohesive rather than random.type,tag,string.special,method, etc.italicstyle.variable.specialkey that was silently overwriting itself.What changed in
scripts/colors/generate_terminal_configs.py_render_zed_alt_theme()— a lightweight template renderer that resolves{{colors.*}}tokens fromcolors.jsonandmaterial_colors.scss(covering tokens like*_fixed,surface_dimthat aren't incolors.json).~/.config/zed/themes/inir-alt-theme.json(iNiR-alt Dark and iNiR-alt Light) every time--zedis passed.Also added
[templates.zed_alt]to~/.config/matugen/config.tomlso it still gets picked up by matugen when called interactively (e.g. viaswitchwall.sh).Motivation
The Zed theme was essentially unreadable with dark/neutral wallpapers — keywords, functions, strings and operators all blended into the background as nearly identical shades of grey. Also, the
zed-colors.jsonmatugen template existed in the repo but was never connected to anything, so users never got to try it.Testing
python3 scripts/colors/generate_terminal_configs.py --zediNiR Darksyntax highlighting is colorful and readableiNiR-alt DarkoriNiR-alt Light— both should be availablemix_ratiointheme_generator.py(look for the comment# Mix a percentage...) to adjust the blend strengthChecklist
Related
Closes #
Fixes #