diff --git a/assets/themes/ayu/ayu.json b/assets/themes/ayu/ayu.json index 745eb2b4c27332..3c929ae80ed54a 100644 --- a/assets/themes/ayu/ayu.json +++ b/assets/themes/ayu/ayu.json @@ -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, @@ -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, @@ -306,7 +316,7 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { + "punctuation.markup": { "color": "#a6a5a0ff", "font_style": null, "font_weight": null @@ -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, @@ -346,17 +371,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#fe8f40ff", + "type": { + "color": "#59c2ffff", "font_style": null, "font_weight": null }, - "title": { - "color": "#bfbdb6ff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#59c2ffff", "font_style": null, "font_weight": null @@ -607,6 +627,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#5c6166ff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#8ca7c2ff", "font_style": null, @@ -622,16 +647,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, @@ -677,7 +707,7 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { + "punctuation.markup": { "color": "#73777bff", "font_style": null, "font_weight": null @@ -687,6 +717,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, @@ -717,17 +762,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#f98d3fff", + "type": { + "color": "#389ee6ff", "font_style": null, "font_weight": null }, - "title": { - "color": "#5c6166ff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#389ee6ff", "font_style": null, "font_weight": null @@ -978,6 +1018,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#cccac2ff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#7399a3ff", "font_style": null, @@ -993,16 +1038,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, @@ -1048,7 +1098,7 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { + "punctuation.markup": { "color": "#b4b3aeff", "font_style": null, "font_weight": null @@ -1058,6 +1108,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, @@ -1088,17 +1153,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#fead66ff", + "type": { + "color": "#73cfffff", "font_style": null, "font_weight": null }, - "title": { - "color": "#cccac2ff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#73cfffff", "font_style": null, "font_weight": null diff --git a/assets/themes/gruvbox/gruvbox.json b/assets/themes/gruvbox/gruvbox.json index 958cf4797dc6f4..b032ed8188409d 100644 --- a/assets/themes/gruvbox/gruvbox.json +++ b/assets/themes/gruvbox/gruvbox.json @@ -253,6 +253,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#b8bb25ff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#8c957dff", "font_style": null, @@ -268,16 +273,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#8ec07cff", "font_style": "italic", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#d3869bff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#d3869bff", "font_style": null, @@ -323,8 +333,8 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { - "color": "#ebdbb2ff", + "punctuation.markup": { + "color": "#83a598ff", "font_style": null, "font_weight": null }, @@ -333,6 +343,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#8ec07cff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#b8bb25ff", "font_style": null, @@ -363,17 +388,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#83a598ff", + "type": { + "color": "#fabd2eff", "font_style": null, "font_weight": null }, - "title": { - "color": "#b8bb25ff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#fabd2eff", "font_style": null, "font_weight": null @@ -641,6 +661,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#b8bb25ff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#8c957dff", "font_style": null, @@ -656,16 +681,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#8ec07cff", "font_style": "italic", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#d3869bff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#d3869bff", "font_style": null, @@ -711,8 +741,8 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { - "color": "#ebdbb2ff", + "punctuation.markup": { + "color": "#83a598ff", "font_style": null, "font_weight": null }, @@ -721,6 +751,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#8ec07cff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#b8bb25ff", "font_style": null, @@ -751,17 +796,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#83a598ff", + "type": { + "color": "#fabd2eff", "font_style": null, "font_weight": null }, - "title": { - "color": "#b8bb25ff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#fabd2eff", "font_style": null, "font_weight": null @@ -1029,6 +1069,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#b8bb25ff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#8c957dff", "font_style": null, @@ -1044,16 +1089,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#8ec07cff", "font_style": "italic", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#d3869bff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#d3869bff", "font_style": null, @@ -1099,8 +1149,8 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { - "color": "#ebdbb2ff", + "punctuation.markup": { + "color": "#83a598ff", "font_style": null, "font_weight": null }, @@ -1109,6 +1159,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#8ec07cff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#83a598ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#b8bb25ff", "font_style": null, @@ -1139,17 +1204,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#83a598ff", + "type": { + "color": "#fabd2eff", "font_style": null, "font_weight": null }, - "title": { - "color": "#b8bb25ff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#fabd2eff", "font_style": null, "font_weight": null @@ -1417,6 +1477,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#79740eff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#677562ff", "font_style": null, @@ -1432,16 +1497,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#427b58ff", "font_style": "italic", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#8f3e71ff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#066578ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#8f3e71ff", "font_style": null, @@ -1487,8 +1557,8 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { - "color": "#282828ff", + "punctuation.markup": { + "color": "#066578ff", "font_style": null, "font_weight": null }, @@ -1497,6 +1567,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#066578ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#427b58ff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#0b6678ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#79740eff", "font_style": null, @@ -1527,17 +1612,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#066578ff", + "type": { + "color": "#b57613ff", "font_style": null, "font_weight": null }, - "title": { - "color": "#79740eff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#b57613ff", "font_style": null, "font_weight": null @@ -1805,6 +1885,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#79740eff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#677562ff", "font_style": null, @@ -1820,16 +1905,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#427b58ff", "font_style": "italic", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#8f3e71ff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#066578ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#8f3e71ff", "font_style": null, @@ -1875,8 +1965,8 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { - "color": "#282828ff", + "punctuation.markup": { + "color": "#066578ff", "font_style": null, "font_weight": null }, @@ -1885,6 +1975,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#066578ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#427b58ff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#0b6678ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#79740eff", "font_style": null, @@ -1915,17 +2020,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#066578ff", + "type": { + "color": "#b57613ff", "font_style": null, "font_weight": null }, - "title": { - "color": "#79740eff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#b57613ff", "font_style": null, "font_weight": null @@ -2193,6 +2293,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#79740eff", + "font_style": null, + "font_weight": 700 + }, "hint": { "color": "#677562ff", "font_style": null, @@ -2208,16 +2313,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#427b58ff", "font_style": "italic", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#8f3e71ff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#066578ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#8f3e71ff", "font_style": null, @@ -2263,8 +2373,8 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { - "color": "#282828ff", + "punctuation.markup": { + "color": "#066578ff", "font_style": null, "font_weight": null }, @@ -2273,6 +2383,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#066578ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#427b58ff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#0b6678ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#79740eff", "font_style": null, @@ -2303,17 +2428,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#066578ff", + "type": { + "color": "#b57613ff", "font_style": null, "font_weight": null }, - "title": { - "color": "#79740eff", - "font_style": null, - "font_weight": 700 - }, - "type": { + "unit": { "color": "#b57613ff", "font_style": null, "font_weight": null diff --git a/assets/themes/one/one.json b/assets/themes/one/one.json index 9d7a29cd957783..261a8c59ad6b44 100644 --- a/assets/themes/one/one.json +++ b/assets/themes/one/one.json @@ -239,6 +239,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#d07277ff", + "font_style": null, + "font_weight": 400 + }, "hint": { "color": "#788ca6ff", "font_style": null, @@ -254,16 +259,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#73ade9ff", "font_style": "normal", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#6eb4bfff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#dce0e5ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#bf956aff", "font_style": null, @@ -309,7 +319,7 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { + "punctuation.markup": { "color": "#d07277ff", "font_style": null, "font_weight": null @@ -319,6 +329,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#a1c181ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#d07277ff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#74ade8ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#a1c181ff", "font_style": null, @@ -349,17 +374,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#a1c181ff", + "type": { + "color": "#6eb4bfff", "font_style": null, "font_weight": null }, - "title": { - "color": "#d07277ff", - "font_style": null, - "font_weight": 400 - }, - "type": { + "unit": { "color": "#6eb4bfff", "font_style": null, "font_weight": null @@ -618,6 +638,11 @@ "font_style": null, "font_weight": null }, + "heading": { + "color": "#d3604fff", + "font_style": null, + "font_weight": 400 + }, "hint": { "color": "#7274a7ff", "font_style": null, @@ -633,16 +658,21 @@ "font_style": null, "font_weight": null }, - "link_text": { + "link": { "color": "#5b79e3ff", "font_style": "italic", "font_weight": null }, - "link_uri": { + "link.url": { "color": "#3882b7ff", "font_style": null, "font_weight": null }, + "namespace": { + "color": "#242529ff", + "font_style": null, + "font_weight": null + }, "number": { "color": "#ad6e25ff", "font_style": null, @@ -688,7 +718,7 @@ "font_style": null, "font_weight": null }, - "punctuation.list_marker": { + "punctuation.markup": { "color": "#d3604fff", "font_style": null, "font_weight": null @@ -698,6 +728,21 @@ "font_style": null, "font_weight": null }, + "raw": { + "color": "#649f57ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#d3604fff", + "font_style": null, + "font_weight": null + }, + "strikethrough": { + "color": "#5c78e2ff", + "font_style": null, + "font_weight": null + }, "string": { "color": "#649f57ff", "font_style": null, @@ -728,17 +773,12 @@ "font_style": null, "font_weight": null }, - "text.literal": { - "color": "#649f57ff", + "type": { + "color": "#3882b7ff", "font_style": null, "font_weight": null }, - "title": { - "color": "#d3604fff", - "font_style": null, - "font_weight": 400 - }, - "type": { + "unit": { "color": "#3882b7ff", "font_style": null, "font_weight": null diff --git a/crates/languages/src/bash/highlights.scm b/crates/languages/src/bash/highlights.scm index 5cb5dad6a00695..a8ae81058a1a33 100644 --- a/crates/languages/src/bash/highlights.scm +++ b/crates/languages/src/bash/highlights.scm @@ -4,11 +4,10 @@ (heredoc_body) (heredoc_start) (ansi_c_string) + (word) ] @string -(command_name) @function - -(variable_name) @property +(variable_name) @variable [ "case" @@ -35,24 +34,67 @@ (comment) @comment (function_definition name: (word) @function) +(command_name (word) @function) + +[ + (file_descriptor) + (number) +] @number -(file_descriptor) @number +(regex) @string.regex [ (command_substitution) (process_substitution) (expansion) -]@embedded +] @embedded + [ "$" "&&" ">" ">>" + ">&" + ">&-" "<" "|" + ":" + "//" + "/" + "%" + "%%" + "#" + "##" + "=" + "==" ] @operator +(test_operator) @keyword.operator + +[ + ";" +] @punctuation.delimiter + +[ + "(" + ")" + "{" + "}" + "[" + "]" +] @punctuation.bracket + +(simple_expansion + "$" @punctuation.special) +(expansion + "${" @punctuation.special + "}" @punctuation.special) @embedded + +(command_substitution + "$(" @punctuation.special + ")" @punctuation.special) + ( (command (_) @constant) (#match? @constant "^-") diff --git a/crates/languages/src/c/highlights.scm b/crates/languages/src/c/highlights.scm index 634f8d81c4ad93..0599844efb7555 100644 --- a/crates/languages/src/c/highlights.scm +++ b/crates/languages/src/c/highlights.scm @@ -103,12 +103,12 @@ (true) (false) (null) -] @constant +] @constant.builtin (identifier) @variable -((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) +((identifier) @constant.variable + (#match? @constant.variable "^_*[A-Z][A-Z\\d_]*$")) (call_expression function: (identifier) @function) diff --git a/crates/languages/src/cpp/highlights.scm b/crates/languages/src/cpp/highlights.scm index 2df9ec2923be3d..b32c557de24904 100644 --- a/crates/languages/src/cpp/highlights.scm +++ b/crates/languages/src/cpp/highlights.scm @@ -77,8 +77,8 @@ type :(primitive_type) @type.primitive (attribute name: (identifier) @keyword) -((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) +((identifier) @constant.variable + (#match? @constant.variable "^_*[A-Z][A-Z\\d_]*$")) (statement_identifier) @label (this) @variable.special @@ -155,7 +155,7 @@ type :(primitive_type) @type.primitive (false) (null) ("nullptr") -] @constant +] @constant.builtin (number_literal) @number diff --git a/crates/languages/src/css/highlights.scm b/crates/languages/src/css/highlights.scm index 4ddfe9a418ca70..7c13e90ec05577 100644 --- a/crates/languages/src/css/highlights.scm +++ b/crates/languages/src/css/highlights.scm @@ -11,6 +11,7 @@ ">" "+" "-" + "|" "*" "/" "=" @@ -19,35 +20,48 @@ "~=" "$=" "*=" +] @operator + +[ "and" "or" "not" "only" -] @operator +] @keyword.operator (attribute_selector (plain_value) @string) +[ + (id_name) + (class_name) +] @selector + +(namespace_name) @namespace +(namespace_selector (tag_name) @namespace "|") + (attribute_name) @attribute -(pseudo_element_selector (tag_name) @attribute) -(pseudo_class_selector (class_name) @attribute) +(pseudo_element_selector "::" (tag_name) @attribute) +(pseudo_class_selector ":" (class_name) @attribute) [ - (class_name) - (id_name) - (namespace_name) (feature_name) + (property_name) ] @property -(property_name) @constant - (function_name) @function +[ + (plain_value) + (keyframes_name) + (keyword_query) +] @constant + ( [ (property_name) (plain_value) - ] @variable.special - (#match? @variable.special "^--") + ] @variable + (#match? @variable "^--") ) [ @@ -61,7 +75,7 @@ (to) (from) (important) -] @keyword +] @keyword (string_value) @string (color_value) @string.special @@ -71,7 +85,7 @@ (float_value) ] @number -(unit) @type +(unit) @constant.unit [ "," @@ -79,7 +93,7 @@ "." "::" ";" - "#" + (id_selector "#") ] @punctuation.delimiter [ diff --git a/crates/languages/src/go/highlights.scm b/crates/languages/src/go/highlights.scm index 609c49c13f53cf..4df57f14bf8f30 100644 --- a/crates/languages/src/go/highlights.scm +++ b/crates/languages/src/go/highlights.scm @@ -2,6 +2,7 @@ (type_identifier) @type (field_identifier) @variable.member +(package_identifier) @variable.namespace (keyed_element . @@ -20,6 +21,15 @@ (method_declaration name: (field_identifier) @function.method) +(method_elem + name: (field_identifier) @function.method) + +[ + ";" + "." + "," + ":" +] @punctuation.delimiter [ "(" @@ -113,7 +123,7 @@ ] @number (const_spec - name: (identifier) @constant) + name: (identifier) @constant.variable) [ (true) diff --git a/crates/languages/src/javascript/highlights.scm b/crates/languages/src/javascript/highlights.scm index 711e2e5d48759f..bdcf1fc83c7cfc 100644 --- a/crates/languages/src/javascript/highlights.scm +++ b/crates/languages/src/javascript/highlights.scm @@ -54,8 +54,8 @@ (identifier) (shorthand_property_identifier) (shorthand_property_identifier_pattern) - ] @constant - (#match? @constant "^_*[A-Z_][A-Z\\d_]*$")) + ] @constant.variable + (#match? @constant.variable "^_*[A-Z_][A-Z\\d_]*$")) ; Literals @@ -65,12 +65,9 @@ [ (null) (undefined) -] @constant.builtin - -[ (true) (false) -] @boolean +] @constant.builtin (comment) @comment @@ -82,6 +79,7 @@ (escape_sequence) @string.escape (regex) @string.regex +(regex_flags) @keyword.regex (number) @number ; Tokens @@ -210,6 +208,8 @@ "<" @punctuation.bracket ">" @punctuation.bracket) +(decorator "@" @punctuation.special) + ; Keywords [ "abstract" @@ -229,11 +229,13 @@ ] @keyword ; JSX elements -(jsx_opening_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) -(jsx_closing_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) -(jsx_self_closing_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) - -(jsx_attribute (property_identifier) @attribute) -(jsx_opening_element (["<" ">"]) @punctuation.bracket) -(jsx_closing_element ([""]) @punctuation.bracket) -(jsx_self_closing_element (["<" "/>"]) @punctuation.bracket) +(jsx_opening_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$")) +(jsx_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$")) +(jsx_self_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$")) + +(jsx_attribute (property_identifier) @attribute.jsx) +(jsx_opening_element (["<" ">"]) @punctuation.jsx.bracket) +(jsx_closing_element ([""]) @punctuation.jsx.bracket) +(jsx_self_closing_element (["<" "/>"]) @punctuation.jsx.bracket) +(jsx_attribute "=" @punctuation.jsx.delimiter) +(jsx_text) @text.jsx diff --git a/crates/languages/src/jsdoc/highlights.scm b/crates/languages/src/jsdoc/highlights.scm index 4b4266c9fd1c97..7eee7b698b5941 100644 --- a/crates/languages/src/jsdoc/highlights.scm +++ b/crates/languages/src/jsdoc/highlights.scm @@ -1,2 +1,2 @@ -(tag_name) @keyword -(type) @type +(tag_name) @comment.doc.keyword +(type) @comment.doc.type diff --git a/crates/languages/src/json/highlights.scm b/crates/languages/src/json/highlights.scm index 8cf7a6d20dc6c7..00c4381f09b5a2 100644 --- a/crates/languages/src/json/highlights.scm +++ b/crates/languages/src/json/highlights.scm @@ -12,7 +12,12 @@ (true) (false) (null) -] @constant +] @constant.builtin + +[ + "," + ":" +] @punctuation.delimiter [ "{" diff --git a/crates/languages/src/jsonc/highlights.scm b/crates/languages/src/jsonc/highlights.scm index 8cf7a6d20dc6c7..00c4381f09b5a2 100644 --- a/crates/languages/src/jsonc/highlights.scm +++ b/crates/languages/src/jsonc/highlights.scm @@ -12,7 +12,12 @@ (true) (false) (null) -] @constant +] @constant.builtin + +[ + "," + ":" +] @punctuation.delimiter [ "{" diff --git a/crates/languages/src/markdown-inline/highlights.scm b/crates/languages/src/markdown-inline/highlights.scm index 61c3e34c62973c..9951676ce0434f 100644 --- a/crates/languages/src/markdown-inline/highlights.scm +++ b/crates/languages/src/markdown-inline/highlights.scm @@ -1,6 +1,20 @@ -(emphasis) @emphasis -(strong_emphasis) @emphasis.strong -(code_span) @text.literal -(link_text) @link_text -(link_label) @link_text -(link_destination) @link_uri +(emphasis) @markup.emphasis +(strong_emphasis) @markup.emphasis.strong +(code_span) @markup.raw +(strikethrough) @markup.strikethrough + +[ + (inline_link) + (shortcut_link) + (collapsed_reference_link) + (full_reference_link) + (image) +] @markup.link + +(inline_link ["(" ")"] @markup.link.url) +(image ["(" ")"] @markup.link.url) +[ + (link_destination) + (uri_autolink) + (email_autolink) +] @markup.link.url diff --git a/crates/languages/src/markdown/highlights.scm b/crates/languages/src/markdown/highlights.scm index 6b9fa3482298c9..fdfee1b01643ab 100644 --- a/crates/languages/src/markdown/highlights.scm +++ b/crates/languages/src/markdown/highlights.scm @@ -1,7 +1,15 @@ +[ + (paragraph) + (indented_code_block) + (pipe_table) +] @text + [ (atx_heading) (setext_heading) -] @title + (thematic_break) +] @markup.heading +(setext_heading (paragraph) @markup.heading) [ (list_marker_plus) @@ -9,8 +17,18 @@ (list_marker_star) (list_marker_dot) (list_marker_parenthesis) -] @punctuation.list_marker + (block_quote_marker) +] @punctuation.markup + +(pipe_table_header "|" @punctuation.markup) +(pipe_table_row "|" @punctuation.markup) +(pipe_table_delimiter_row "|" @punctuation.markup) +(pipe_table_delimiter_cell "-" @punctuation.markup) (fenced_code_block (info_string - (language) @text.literal)) + (language) @punctuation.markup.embedded)) +(fenced_code_block_delimiter) @punctuation.markup.embedded + +(link_reference_definition) @markup.link +(link_destination) @markup.link.url diff --git a/crates/languages/src/python/highlights.scm b/crates/languages/src/python/highlights.scm index 0495f87716bd21..992265f12094c3 100644 --- a/crates/languages/src/python/highlights.scm +++ b/crates/languages/src/python/highlights.scm @@ -5,9 +5,10 @@ (#match? @type.class "^_*[A-Z][A-Za-z0-9_]*$")) ; ALL_CAPS for constants: -((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z0-9_]*$")) +((identifier) @constant.variable + (#match? @constant.variable "^_*[A-Z][A-Z0-9_]*$")) +(identifier) @variable (attribute attribute: (identifier) @property) (type (identifier) @type) (generic_type (identifier) @type) @@ -114,6 +115,12 @@ (#match? @variable.special "^self|cls$") ] +[ + "." + "," + ":" +] @punctuation.delimiter + [ "(" ")" @@ -187,6 +194,7 @@ "&" "%" "%=" + "@" "^" "+" "->" diff --git a/crates/languages/src/regex/highlights.scm b/crates/languages/src/regex/highlights.scm index d1ebcda0d3a8c9..164333eb95b42a 100644 --- a/crates/languages/src/regex/highlights.scm +++ b/crates/languages/src/regex/highlights.scm @@ -4,24 +4,22 @@ "(?" "(?:" "(?<" + "(?P=" + "<" ">" "[" "]" "{" "}" -] @punctuation.bracket +] @punctuation.regex.bracket -(group_name) @property +(group_name) @label.regex [ (identity_escape) (control_letter_escape) (character_class_escape) (control_escape) - (start_assertion) - (end_assertion) - (boundary_assertion) - (non_boundary_assertion) ] @string.escape [ @@ -31,18 +29,26 @@ "|" "=" "!" -] @operator + (start_assertion) + (end_assertion) +] @operator.regex + +[ + (boundary_assertion) + (non_boundary_assertion) + (backreference_escape) +] @keyword.operator.regex (count_quantifier [ (decimal_digits) @number - "," @punctuation.delimiter + "," @punctuation.regex.delimiter ]) (character_class [ - "^" @operator - (class_range "-" @operator) + "^" @operator.regex + (class_range "-" @operator.regex) ]) (class_character) @constant.character diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm index d25b8a734719ba..906131f0e2cc76 100644 --- a/crates/languages/src/rust/highlights.scm +++ b/crates/languages/src/rust/highlights.scm @@ -1,3 +1,4 @@ +(identifier) @variable (type_identifier) @type (primitive_type) @type.builtin (self) @variable.special @@ -47,8 +48,8 @@ (#match? @type "^[A-Z]")) ; Assume all-caps names are constants -((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) +((identifier) @constant.variable + (#match? @constant.variable "^_*[A-Z][A-Z\\d_]*$")) [ "(" @@ -129,7 +130,7 @@ (float_literal) ] @number -(boolean_literal) @constant +(boolean_literal) @constant.builtin [ (line_comment) diff --git a/crates/languages/src/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scm index 323f58c5577f30..347cbcc7cdd737 100644 --- a/crates/languages/src/tsx/highlights.scm +++ b/crates/languages/src/tsx/highlights.scm @@ -57,8 +57,8 @@ (identifier) (shorthand_property_identifier) (shorthand_property_identifier_pattern) - ] @constant - (#match? @constant "^_*[A-Z_][A-Z\\d_]*$")) + ] @constant.variable + (#match? @constant.variable "^_*[A-Z_][A-Z\\d_]*$")) ; Literals @@ -68,12 +68,9 @@ [ (null) (undefined) -] @constant.builtin - -[ (true) (false) -] @boolean +] @constant.builtin (comment) @comment @@ -221,6 +218,8 @@ "<" @punctuation.bracket ">" @punctuation.bracket) +(decorator "@" @punctuation.special) + ; Keywords [ "abstract" @@ -240,11 +239,13 @@ ] @keyword ; JSX elements -(jsx_opening_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) -(jsx_closing_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) -(jsx_self_closing_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) - -(jsx_attribute (property_identifier) @attribute) -(jsx_opening_element (["<" ">"]) @punctuation.bracket) -(jsx_closing_element ([""]) @punctuation.bracket) -(jsx_self_closing_element (["<" "/>"]) @punctuation.bracket) +(jsx_opening_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$")) +(jsx_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$")) +(jsx_self_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$")) + +(jsx_attribute (property_identifier) @attribute.jsx) +(jsx_opening_element (["<" ">"]) @punctuation.jsx.bracket) +(jsx_closing_element ([""]) @punctuation.jsx.bracket) +(jsx_self_closing_element (["<" "/>"]) @punctuation.jsx.bracket) +(jsx_attribute "=" @punctuation.jsx.delimiter) +(jsx_text) @text.jsx diff --git a/crates/languages/src/typescript/highlights.scm b/crates/languages/src/typescript/highlights.scm index 091ddfed9d02e9..91fa64db1a81dd 100644 --- a/crates/languages/src/typescript/highlights.scm +++ b/crates/languages/src/typescript/highlights.scm @@ -31,8 +31,8 @@ (identifier) (shorthand_property_identifier) (shorthand_property_identifier_pattern) - ] @constant - (#match? @constant "^_*[A-Z_][A-Z\\d_]*$")) + ] @constant.variable + (#match? @constant.variable "^_*[A-Z_][A-Z\\d_]*$")) ; Properties @@ -83,12 +83,9 @@ [ (null) (undefined) -] @constant.builtin - -[ (true) (false) -] @boolean +] @constant.builtin (literal_type [ @@ -199,6 +196,8 @@ "<" @punctuation.bracket ">" @punctuation.bracket) +(decorator "@" @punctuation.special) + ; Keywords [