Skip to content

Commit

Permalink
Add syntax scopes to themes (#25323)
Browse files Browse the repository at this point in the history
Release Notes:

  - Added syntax scopes to themes

Supports:

- [Improve CSS syntax
highlighting](#25326)
- [Improve Go syntax
highlighting](#25327)
- [Improve Markdown syntax
highlighting](#25330)

Changes:

- Adds highlighting rules for the following new scopes, using theme
colors:
    - `heading`
    - `namespace`
    - `selector`
    - `strikethrough`
    - `unit`

- Renames scopes that are no longer used in `zed/crates/languages/src`
or `zed/extensions` to their new names:
    - `punctuation.list_marker` -> `punctuation.markup`
    - `link_text` -> `link`
- `link_uri` -> `link.url`, as defined in the [gitcommit
grammar](https://github.com/zed-industries/zed/blob/dff47a843695d03160680502e6d94634e376698e/crates/languages/src/gitcommit/highlights.scm#L5)
    - `text.literal` -> `raw`
  • Loading branch information
chbk authored Feb 21, 2025
1 parent 5397ca2 commit 2f416ae
Show file tree
Hide file tree
Showing 3 changed files with 369 additions and 94 deletions.
123 changes: 99 additions & 24 deletions assets/themes/ayu/ayu.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@
"font_style": null,
"font_weight": null
},
"heading": {
"color": "#bfbdb6ff",
"font_style": null,
"font_weight": 700
},
"hint": {
"color": "#628b80ff",
"font_style": null,
Expand All @@ -251,16 +256,21 @@
"font_style": null,
"font_weight": null
},
"link_text": {
"link": {
"color": "#fe8f40ff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"link.url": {
"color": "#aad84cff",
"font_style": null,
"font_weight": null
},
"namespace": {
"color": "#bfbdb6ff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#d2a6ffff",
"font_style": null,
Expand Down Expand Up @@ -306,7 +316,7 @@
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"punctuation.markup": {
"color": "#a6a5a0ff",
"font_style": null,
"font_weight": null
Expand All @@ -316,6 +326,21 @@
"font_style": null,
"font_weight": null
},
"raw": {
"color": "#fe8f40ff",
"font_style": null,
"font_weight": null
},
"selector": {
"color": "#5ac1feff",
"font_style": null,
"font_weight": null
},
"strikethrough": {
"color": "#5ac1feff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#a9d94bff",
"font_style": null,
Expand Down Expand Up @@ -346,11 +371,6 @@
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#fe8f40ff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#bfbdb6ff",
"font_style": null,
Expand All @@ -361,6 +381,11 @@
"font_style": null,
"font_weight": null
},
"unit": {
"color": "#59c2ffff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#bfbdb6ff",
"font_style": null,
Expand Down Expand Up @@ -607,6 +632,11 @@
"font_style": null,
"font_weight": null
},
"heading": {
"color": "#5c6166ff",
"font_style": null,
"font_weight": 700
},
"hint": {
"color": "#8ca7c2ff",
"font_style": null,
Expand All @@ -622,16 +652,21 @@
"font_style": null,
"font_weight": null
},
"link_text": {
"link": {
"color": "#f98d3fff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"link.url": {
"color": "#85b304ff",
"font_style": null,
"font_weight": null
},
"namespace": {
"color": "#5c6166ff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#a37accff",
"font_style": null,
Expand Down Expand Up @@ -677,7 +712,7 @@
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"punctuation.markup": {
"color": "#73777bff",
"font_style": null,
"font_weight": null
Expand All @@ -687,6 +722,21 @@
"font_style": null,
"font_weight": null
},
"raw": {
"color": "#f98d3fff",
"font_style": null,
"font_weight": null
},
"selector": {
"color": "#3b9ee5ff",
"font_style": null,
"font_weight": null
},
"strikethrough": {
"color": "#3b9ee5ff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#86b300ff",
"font_style": null,
Expand Down Expand Up @@ -717,11 +767,6 @@
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#f98d3fff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#5c6166ff",
"font_style": null,
Expand All @@ -732,6 +777,11 @@
"font_style": null,
"font_weight": null
},
"unit": {
"color": "#389ee6ff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#5c6166ff",
"font_style": null,
Expand Down Expand Up @@ -978,6 +1028,11 @@
"font_style": null,
"font_weight": null
},
"heading": {
"color": "#cccac2ff",
"font_style": null,
"font_weight": 700
},
"hint": {
"color": "#7399a3ff",
"font_style": null,
Expand All @@ -993,16 +1048,21 @@
"font_style": null,
"font_weight": null
},
"link_text": {
"link": {
"color": "#fead66ff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"link.url": {
"color": "#d5fe80ff",
"font_style": null,
"font_weight": null
},
"namespace": {
"color": "#cccac2ff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#dfbfffff",
"font_style": null,
Expand Down Expand Up @@ -1048,7 +1108,7 @@
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"punctuation.markup": {
"color": "#b4b3aeff",
"font_style": null,
"font_weight": null
Expand All @@ -1058,6 +1118,21 @@
"font_style": null,
"font_weight": null
},
"raw": {
"color": "#fead66ff",
"font_style": null,
"font_weight": null
},
"selector": {
"color": "#72cffeff",
"font_style": null,
"font_weight": null
},
"strikethrough": {
"color": "#72cffeff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#d4fe7fff",
"font_style": null,
Expand Down Expand Up @@ -1088,11 +1163,6 @@
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#fead66ff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#cccac2ff",
"font_style": null,
Expand All @@ -1103,6 +1173,11 @@
"font_style": null,
"font_weight": null
},
"unit": {
"color": "#73cfffff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#cccac2ff",
"font_style": null,
Expand Down
Loading

0 comments on commit 2f416ae

Please sign in to comment.