Skip to content

fix: syntax colors and colorized brackets - #31

Open
alihakankurt wants to merge 1 commit into
rose-pine:mainfrom
alihakankurt:fix/syntax-colors
Open

fix: syntax colors and colorized brackets#31
alihakankurt wants to merge 1 commit into
rose-pine:mainfrom
alihakankurt:fix/syntax-colors

Conversation

@alihakankurt

Copy link
Copy Markdown

Summary

  • Fix some syntax token colors to match the Rosé Pine palette specification
  • Introduce new syntax tokens for LSP semantic highlights
  • Add accents array to use colorized brackets with Rosé Pine colors
  • Use $highlightHigh for border.variant to visually separate elevated surfaces (e.g. command palette, context menu)

Details

  • Palette fixes: constant/number$rose, enum$foam, preproc$pine, property$iris, string.escape/string.special$iris, string.special.symbol$gold.
  • Semantic tokens added:
    • Constants: constant.builtin, constant.macro
    • Functions: function.builtin, function.call, function.decorator, function.macro, function.method, function.method.call
    • Keywords: keyword.modifier, keyword.preproc
    • Modules: module, namespace
    • Tags: tag.doctype, tag.attribute, tag.delimiter
    • Types: type.builtin, type.class, type.enum, type.interface, type.struct, type.parameter, type.definition, …
    • Variables: variable.builtin, variable.parameter
    • Text: text
  • Bracket colorization: added accents array ($love, $gold, $rose, $pine, $foam, $iris) so matching brackets are tinted with palette colors.
  • Elevated surfaces: border.variant now uses $highlightHigh instead of $surface to delineate popovers/menus.

Notes

  • I based these token choices on commonly used languages such as C/C++, C#, Rust, Python, XML/HTML, and JS/TS.
  • With the property change, JSON keys now use $iris instead of $foam. If we'd prefer to keep $foam for JSON keys, we can add property.json_key to override it.

Screenshots

  • Current
current
  • Updated (with semantic_tokens set to combined)
updated

Issues

Fixes #26
Fixes #30

- Fix some syntax token colors to match the Rosé Pine palette specification
- Introduce new syntax tokens for LSP semantic highlights
- Add accents array to use colorized brackets with Rosé Pine colors
- Use $highlightHigh for `border.variant` to visually separate elevated surfaces (e.g. command palette, context menu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant