on master help sign in
Updated tree-sitter query scopes (#896)

* updated theme scopes variable.property -> variable.field property -> variable.field * updated theme scopes * update book and themes updated book and themes to reflect scope changes * wip * update more queries * update dark_plus.toml

commitee889aaa854d0036da3bae16252bc382e50b0df6 authorKirawi <67773714+kirawi@users.noreply.github.com> dateTue 2 Nov 2021, 23:00 (5 years ago) parent7a0c432
37 files changed+198−164
book/src/themes.md+6−4 helix-core/src/lib.rs+1 runtime/queries/bash/highlights.scm+2−2 runtime/queries/c-sharp/highlights.scm+5−5 runtime/queries/c/highlights.scm+3−3 runtime/queries/css/highlights.scm+7−7 runtime/queries/elixir/highlights.scm+8−11 runtime/queries/go/highlights.scm+3−3 runtime/queries/haskell/highlights.scm+3−3 runtime/queries/java/highlights.scm+6−5 runtime/queries/javascript/highlights.scm+2−2 runtime/queries/json/highlights.scm+15−4 runtime/queries/julia/highlights.scm+6−6 runtime/queries/ledger/highlights.scm+2−2 runtime/queries/lua/highlights.scm+3−3 runtime/queries/nix/highlights.scm+5−7 runtime/queries/ocaml/highlights.scm+4−4 runtime/queries/php/highlights.scm+6−6 runtime/queries/protobuf/highlights.scm+4−6 runtime/queries/python/highlights.scm+4−7 runtime/queries/ruby/highlights.scm+3−3 runtime/queries/rust/highlights.scm+24−11 runtime/queries/svelte/highlights.scm+1−1 runtime/queries/toml/highlights.scm+4−4 runtime/queries/tsq/highlights.scm+2−2 runtime/queries/yaml/highlights.scm+5−5 runtime/queries/zig/highlights.scm+4−4 runtime/themes/base16_default_dark.toml+3−3 runtime/themes/bogster.toml+3−3 runtime/themes/dark_plus.toml+35−18 runtime/themes/everforest_dark.toml+3−4 runtime/themes/gruvbox.toml+3−4 runtime/themes/ingrid.toml+3−3 runtime/themes/monokai.toml+4−3 runtime/themes/nord.toml+3−3 runtime/themes/rose_pine.toml+2−2 theme.toml+1−1
book/src/themes.md+6−4
@@ -103,8 +103,6 @@ We use a similar set of scopes as
103103[SublimeText](https://www.sublimetext.com/docs/scope_naming.html). See also
104104[TextMate](https://macromates.com/manual/en/language_grammars) scopes.
105105
106−- `escape` (TODO: rename to (constant).character.escape)
107−
108106- `type` - Types
109107 - `builtin` - Primitive types provided by the language (`int`, `usize`)
110108
@@ -112,8 +110,11 @@ We use a similar set of scopes as
112110 - `builtin` Special constants provided by the language (`true`, `false`, `nil` etc)
113111 - `boolean`
114112 - `character`
113+ - `escape`
114+ - `numeric` (numbers)
115+ - `integer`
116+ - `float`
115117
116−- `number` (TODO: rename to constant.number/.numeric.{integer, float, complex})
117118- `string` (TODO: string.quoted.{single, double}, string.raw/.unquoted)?
118119 - `regexp` - Regular expressions
119120 - `special`
@@ -129,7 +130,8 @@ We use a similar set of scopes as
129130- `variable` - Variables
130131 - `builtin` - Reserved language variables (`self`, `this`, `super`, etc)
131132 - `parameter` - Function parameters
132− - `property`
133+ - `other`
134+ - `member` - Fields of composite data types (e.g. structs, unions)
133135 - `function` (TODO: ?)
134136
135137- `label`
helix-core/src/lib.rs+1
@@ -35,6 +35,7 @@ pub fn find_first_non_whitespace_char(line: RopeSlice) -> Option<usize> {
3535 line.chars().position(|ch| !ch.is_whitespace())
3636}
3737
38+/// Find `.git` root.
3839pub fn find_root(root: Option<&str>) -> Option<std::path::PathBuf> {
3940 let current_dir = std::env::current_dir().expect("unable to determine current directory");
4041
runtime/queries/bash/highlights.scm+2−2
@@ -7,7 +7,7 @@
77
88(command_name) @function
99
10−(variable_name) @property
10+(variable_name) @variable.other.member
1111
1212[
1313 "case"
@@ -31,7 +31,7 @@
3131
3232(function_definition name: (word) @function)
3333
34−(file_descriptor) @number
34+(file_descriptor) @constant.numeric.integer
3535
3636[
3737 (command_substitution)
runtime/queries/c-sharp/highlights.scm+5−5
@@ -20,16 +20,16 @@
2020] @type.builtin
2121
2222;; Enum
23−(enum_member_declaration (identifier) @variable.property)
23+(enum_member_declaration (identifier) @variable.other.member)
2424
2525;; Literals
2626[
2727 (real_literal)
2828 (integer_literal)
29−] @number
29+] @constant.numeric.integer
3030
31+(character_literal) @constant.character
3132[
32− (character_literal)
3333 (string_literal)
3434 (verbatim_string_literal)
3535 (interpolated_string_text)
@@ -40,8 +40,8 @@
4040 "$@\""
4141 ] @string
4242
43+(boolean_literal) @constant.builtin.boolean
4344[
44− (boolean_literal)
4545 (null_literal)
4646 (void_keyword)
4747] @constant.builtin
@@ -98,7 +98,7 @@
9898;; Keywords
9999(modifier) @keyword
100100(this_expression) @keyword
101−(escape_sequence) @keyword
101+(escape_sequence) @constant.character.escape
102102
103103[
104104 "as"
runtime/queries/c/highlights.scm+3−3
@@ -60,8 +60,8 @@
6060(system_lib_string) @string
6161
6262(null) @constant
63−(number_literal) @number
64−(char_literal) @string
63+(number_literal) @constant.numeric.integer
64+(char_literal) @constant.character
6565
6666(call_expression
6767 function: (identifier) @function)
@@ -73,7 +73,7 @@
7373(preproc_function_def
7474 name: (identifier) @function.special)
7575
76−(field_identifier) @property
76+(field_identifier) @variable.other.member
7777(statement_identifier) @label
7878(type_identifier) @type
7979(primitive_type) @type
runtime/queries/css/highlights.scm+7−7
@@ -26,11 +26,11 @@
2626(pseudo_element_selector (tag_name) @attribute)
2727(pseudo_class_selector (class_name) @attribute)
2828
29−(class_name) @property
30−(id_name) @property
31−(namespace_name) @property
32−(property_name) @property
33−(feature_name) @property
29+(class_name) @variable.other.member
30+(id_name) @variable.other.member
31+(namespace_name) @variable.other.member
32+(property_name) @variable.other.member
33+(feature_name) @variable.other.member
3434
3535(attribute_name) @attribute
3636
@@ -55,8 +55,8 @@
5555(string_value) @string
5656(color_value) @string.special
5757
58−(integer_value) @number
59−(float_value) @number
58+(integer_value) @constant.numeric.integer
59+(float_value) @constant.numeric.float
6060(unit) @type
6161
6262"#" @punctuation.delimiter
runtime/queries/elixir/highlights.scm+8−11
@@ -39,13 +39,13 @@
3939
4040; * module attribute
4141(unary_operator
42− operator: "@" @variable.property
42+ operator: "@" @variable.other.member
4343 operand: [
44− (identifier) @variable.property
44+ (identifier) @variable.other.member
4545 (call
46− target: (identifier) @variable.property)
47− (boolean) @variable.property
48− (nil) @variable.property
46+ target: (identifier) @variable.other.member)
47+ (boolean) @variable.other.member
48+ (nil) @variable.other.member
4949 ])
5050
5151; * capture operator
@@ -79,11 +79,8 @@
7979(nil) @constant.builtin
8080
8181(boolean) @constant.builtin.boolean
82−
83−[
84− (integer)
85− (float)
86−] @number
82+(integer) @constant.numeric.integer
83+(float) @constant.numeric.float
8784
8885(alias) @type
8986
@@ -97,7 +94,7 @@
9794
9895(interpolation "#{" @punctuation.special "}" @punctuation.special) @embedded
9996
100−(escape_sequence) @escape
97+(escape_sequence) @constant.character.escape
10198
10299[
103100 (atom)
runtime/queries/go/highlights.scm+3−3
@@ -25,7 +25,7 @@
2525(variadic_parameter_declaration (identifier) @variable.parameter)
2626
2727(type_identifier) @type
28−(field_identifier) @property
28+(field_identifier) @variable.other.member
2929(identifier) @variable
3030(package_identifier) @variable
3131
@@ -130,13 +130,13 @@
130130 (rune_literal)
131131] @string
132132
133−(escape_sequence) @escape
133+(escape_sequence) @constant.character.escape
134134
135135[
136136 (int_literal)
137137 (float_literal)
138138 (imaginary_literal)
139−] @number
139+] @constant.numeric.integer
140140
141141[
142142 (true)
runtime/queries/haskell/highlights.scm+3−3
@@ -13,9 +13,9 @@
1313(constraint class: (class_name (type)) @class)
1414(class (class_head class: (class_name (type)) @class))
1515(instance (instance_head class: (class_name (type)) @class))
16−(integer) @number
17−(exp_literal (float)) @number
18−(char) @literal
16+(integer) @constant.numeric.integer
17+(exp_literal (float)) @constant.numeric.float
18+(char) @constant.character
1919(con_unit) @literal
2020(con_list) @literal
2121(tycon_arrow) @operator
runtime/queries/java/highlights.scm+6−5
@@ -59,14 +59,15 @@
5959 (hex_integer_literal)
6060 (decimal_integer_literal)
6161 (octal_integer_literal)
62+] @constant.numeric.integer
63+
64+[
6265 (decimal_floating_point_literal)
6366 (hex_floating_point_literal)
64−] @number
67+] @constant.numeric.float
6568
66−[
67− (character_literal)
68− (string_literal)
69−] @string
69+(character_literal) @constant.character
70+(string_literal) @string
7071
7172[
7273 (true)
runtime/queries/javascript/highlights.scm+2−2
@@ -65,7 +65,7 @@
6565; Properties
6666;-----------
6767
68−(property_identifier) @property
68+(property_identifier) @variable.other.member
6969
7070; Literals
7171;---------
@@ -88,7 +88,7 @@
8888] @string
8989
9090(regex) @string.regexp
91−(number) @number
91+(number) @constant.numeric.integer
9292
9393; Tokens
9494;-------
runtime/queries/json/highlights.scm+15−4
@@ -1,9 +1,20 @@
1+[
2+ (true)
3+ (false)
4+] @constant.builtin.boolean
5+(null) @constant.builtin
6+(number) @constant.numeric
17(pair
28 key: (_) @keyword)
39
410(string) @string
11+(escape_sequence) @constant.character.escape
12+(ERROR) @error
513
6−(object
7− "{" @escape
8− (_)
9− "}" @escape)
14+"," @punctuation.delimiter
15+[
16+ "["
17+ "]"
18+ "{"
19+ "}"
20+] @punctuation.bracket
runtime/queries/julia/highlights.scm+6−6
@@ -15,7 +15,7 @@
1515
1616(field_expression
1717 (identifier)
18− (identifier) @field .)
18+ (identifier) @variable.other.member .)
1919
2020(function_definition
2121 name: (identifier) @function)
@@ -80,14 +80,14 @@
8080(struct_definition
8181 name: (identifier) @type)
8282
83−(number) @number
83+(number) @constant.numeric.integer
8484(range_expression
85− (identifier) @number
86− (eq? @number "end"))
85+ (identifier) @constant.numeric.integer
86+ (eq? @constant.numeric.integer "end"))
8787(range_expression
8888 (_
89− (identifier) @number
90− (eq? @number "end")))
89+ (identifier) @constant.numeric.integer
90+ (eq? @constant.numeric.integer "end")))
9191(coefficient_expression
9292 (number)
9393 (identifier) @constant.builtin)
runtime/queries/ledger/highlights.scm+2−2
@@ -7,9 +7,9 @@
77 (date)
88 (interval)
99 (quantity)
10−] @number
10+] @constant.numeric.integer
1111
12−((account) @field)
12+((account) @variable.other.member)
1313((commodity) @text.literal)
1414
1515"include" @include
runtime/queries/lua/highlights.scm+3−3
@@ -150,14 +150,14 @@
150150(table ["{" "}"] @constructor)
151151(comment) @comment
152152(string) @string
153−(number) @number
153+(number) @constant.numeric.integer
154154(label_statement) @label
155155; A bit of a tricky one, this will only match field names
156−(field . (identifier) @property (_))
156+(field . (identifier) @variable.other.member (_))
157157(shebang) @comment
158158
159159;; Property
160−(property_identifier) @property
160+(property_identifier) @variable.other.member
161161
162162;; Variable
163163(identifier) @variable
runtime/queries/nix/highlights.scm+5−7
@@ -33,16 +33,14 @@
3333
3434(uri) @string.special.uri
3535
36−[
37− (integer)
38− (float)
39−] @number
36+(integer) @constant.numeric.integer
37+(float) @constant.numeric.float
4038
4139(interpolation
4240 "${" @punctuation.special
4341 "}" @punctuation.special) @embedded
4442
45−(escape_sequence) @escape
43+(escape_sequence) @constant.character.escape
4644
4745(function
4846 universal: (identifier) @variable.parameter
@@ -66,8 +64,8 @@
6664(binary
6765 operator: _ @operator)
6866
69−(attr_identifier) @property
70−(inherit attrs: (attrs_inherited (identifier) @property) )
67+(attr_identifier) @variable.other.member
68+(inherit attrs: (attrs_inherited (identifier) @variable.other.member) )
7169
7270[
7371 ";"
runtime/queries/ocaml/highlights.scm+4−4
@@ -51,14 +51,14 @@
5151; Properties
5252;-----------
5353
54−[(label_name) (field_name) (instance_variable_name)] @property
54+[(label_name) (field_name) (instance_variable_name)] @variable.other.member
5555
5656; Constants
5757;----------
5858
5959[(boolean) (unit)] @constant
6060
61−[(number) (signed_number)] @number
61+[(number) (signed_number)] @constant.numeric.integer
6262
6363(character) @constant.character
6464
@@ -66,7 +66,7 @@
6666
6767(quoted_string "{" @string "}" @string) @string
6868
69−(escape_sequence) @string.escape
69+(escape_sequence) @constant.character.escape
7070
7171[
7272 (conversion_specification)
@@ -145,7 +145,7 @@
145145; Attributes
146146;-----------
147147
148−(attribute_id) @property
148+(attribute_id) @variable.other.member
149149
150150; Comments
151151;---------
runtime/queries/php/highlights.scm+6−6
@@ -30,12 +30,12 @@
3030; Member
3131
3232(property_element
33− (variable_name) @property)
33+ (variable_name) @variable.other.member)
3434
3535(member_access_expression
36− name: (variable_name (name)) @property)
36+ name: (variable_name (name)) @variable.other.member)
3737(member_access_expression
38− name: (name) @property)
38+ name: (name) @variable.other.member)
3939
4040; Variables
4141
@@ -56,10 +56,10 @@
5656
5757(string) @string
5858(heredoc) @string
59−(boolean) @constant.builtin
59+(boolean) @constant.builtin.boolean
6060(null) @constant.builtin
61−(integer) @number
62−(float) @number
61+(integer) @constant.numeric.integer
62+(float) @constant.numeric.float
6363(comment) @comment
6464
6565"$" @operator
runtime/queries/protobuf/highlights.scm+4−6
@@ -34,16 +34,14 @@
3434[
3535 (fieldName)
3636 (optionName)
37−] @property
37+] @variable.other.member
3838(enumVariantName) @type.enum.variant
3939
4040(fullIdent) @namespace
4141
42−[
43− (intLit)
44− (floatLit)
45−] @number
46−(boolLit) @constant.builtin
42+(intLit) @constant.numeric.integer
43+(floatLit) @constant.numeric.float
44+(boolLit) @constant.builtin.boolean
4745(strLit) @string
4846
4947(constant) @constant
runtime/queries/python/highlights.scm+4−7
@@ -29,7 +29,7 @@
2929 name: (identifier) @function)
3030
3131(identifier) @variable
32−(attribute attribute: (identifier) @property)
32+(attribute attribute: (identifier) @variable.other.member)
3333(type (identifier) @type)
3434
3535; Literals
@@ -40,14 +40,11 @@
4040 (false)
4141] @constant.builtin
4242
43−[
44− (integer)
45− (float)
46−] @number
47−
43+(integer) @constant.numeric.integer
44+(float) @constant.numeric.float
4845(comment) @comment
4946(string) @string
50−(escape_sequence) @escape
47+(escape_sequence) @constant.character.escape
5148
5249(interpolation
5350 "{" @punctuation.special
runtime/queries/ruby/highlights.scm+3−3
@@ -55,7 +55,7 @@
5555[
5656 (class_variable)
5757 (instance_variable)
58−] @property
58+] @variable.other.member
5959
6060((identifier) @constant.builtin
6161 (#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
@@ -101,12 +101,12 @@
101101] @string.special.symbol
102102
103103(regex) @string.regexp
104−(escape_sequence) @escape
104+(escape_sequence) @constant.character.escape
105105
106106[
107107 (integer)
108108 (float)
109−] @number
109+] @constant.numeric.integer
110110
111111[
112112 (nil)
runtime/queries/rust/highlights.scm+24−11
@@ -15,15 +15,13 @@
1515; Primitives
1616; ---
1717
18−(escape_sequence) @escape
18+(escape_sequence) @constant.character.escape
1919(primitive_type) @type.builtin
2020(boolean_literal) @constant.builtin.boolean
21+(integer_literal) @constant.numeric.integer
22+(float_literal) @constant.numeric.float
23+(char_literal) @constant.character
2124[
22− (integer_literal)
23− (float_literal)
24−] @number
25−[
26− (char_literal)
2725 (string_literal)
2826 (raw_string_literal)
2927] @string
@@ -40,10 +38,10 @@
4038(enum_variant (identifier) @type.enum.variant)
4139
4240(field_initializer
43− (field_identifier) @property)
41+ (field_identifier) @variable.other.member)
4442(shorthand_field_initializer
45− (identifier) @variable.property)
46−(shorthand_field_identifier) @variable.property
43+ (identifier) @variable.other.member)
44+(shorthand_field_identifier) @variable.other.member
4745
4846(lifetime
4947 "'" @label
@@ -81,9 +79,24 @@
8179 ] @punctuation.bracket)
8280
8381; ---
84−; Parameters
82+; Variables
8583; ---
8684
85+(let_declaration
86+ pattern: [
87+ ((identifier) @variable)
88+ ((tuple_pattern
89+ (identifier) @variable))
90+ ])
91+
92+; It needs to be anonymous to not conflict with `call_expression` further below.
93+(_
94+ value: (field_expression
95+ value: (identifier)? @variable
96+ field: (field_identifier) @variable.other.member))
97+
98+(arguments
99+ (identifier) @variable.parameter)
87100(parameter
88101 pattern: (identifier) @variable.parameter)
89102(closure_parameters
@@ -336,4 +349,4 @@
336349
337350(type_identifier) @type
338351(identifier) @variable
339−(field_identifier) @property
352+(field_identifier) @variable.other.member
runtime/queries/svelte/highlights.scm+1−1
@@ -29,7 +29,7 @@
2929 (#match? @_attr "^(href|src)$"))
3030
3131(tag_name) @tag
32−(attribute_name) @property
32+(attribute_name) @variable.other.member
3333(erroneous_end_tag_name) @error
3434(comment) @comment
3535
runtime/queries/toml/highlights.scm+4−4
@@ -1,17 +1,17 @@
11; Properties
22;-----------
33
4−(bare_key) @property
4+(bare_key) @variable.other.member
55(quoted_key) @string
66
77; Literals
88;---------
99
10−(boolean) @constant.builtin
10+(boolean) @constant.builtin.boolean
1111(comment) @comment
1212(string) @string
13−(integer) @number
14−(float) @number
13+(integer) @constant.numeric.integer
14+(float) @constant.numeric.float
1515(offset_date_time) @string.special
1616(local_date_time) @string.special
1717(local_date) @string.special
runtime/queries/tsq/highlights.scm+2−2
@@ -35,12 +35,12 @@
3535
3636(comment) @comment
3737
38−(field_name) @property
38+(field_name) @variable.other.member
3939
4040(capture) @label
4141
4242(predicate_name) @function
4343
44−(escape_sequence) @escape
44+(escape_sequence) @constant.character.escape
4545
4646(node_name) @variable
runtime/queries/yaml/highlights.scm+5−5
@@ -1,12 +1,12 @@
1−(block_mapping_pair key: (_) @property)
2−(flow_mapping (_ key: (_) @property))
1+(block_mapping_pair key: (_) @variable.other.member)
2+(flow_mapping (_ key: (_) @variable.other.member))
33(boolean_scalar) @constant.builtin.boolean
44(null_scalar) @constant.builtin
55(double_quote_scalar) @string
66(single_quote_scalar) @string
7−(escape_sequence) @string.escape
8−(integer_scalar) @number
9−(float_scalar) @number
7+(escape_sequence) @constant.character.escape
8+(integer_scalar) @constant.numeric.integer
9+(float_scalar) @constant.numeric.float
1010(comment) @comment
1111(anchor_name) @type
1212(alias_name) @type
runtime/queries/zig/highlights.scm+4−4
@@ -14,7 +14,7 @@ parameter: (IDENTIFIER) @variable.parameter
1414[
1515 field_member: (IDENTIFIER)
1616 field_access: (IDENTIFIER)
17−] @variable.property
17+] @variable.other.member
1818
1919;; assume TitleCase is a type
2020(
@@ -75,9 +75,9 @@ field_constant: (IDENTIFIER) @constant
7575((BUILTINIDENTIFIER) @keyword.control.import
7676 (#any-of? @keyword.control.import "@import" "@cImport"))
7777
78−(INTEGER) @number
78+(INTEGER) @constant.numeric.integer
7979
80−(FLOAT) @number
80+(FLOAT) @constant.numeric.float
8181
8282[
8383 (LINESTRING)
@@ -85,7 +85,7 @@ field_constant: (IDENTIFIER) @constant
8585] @string
8686
8787(CHAR_LITERAL) @constant.character
88−(EscapeSequence) @escape
88+(EscapeSequence) @constant.character.escape
8989(FormatSequence) @string.special
9090
9191[
runtime/themes/base16_default_dark.toml+3−3
@@ -16,14 +16,14 @@
1616"operator" = "base05"
1717"ui.text.focus" = { fg = "base05" }
1818"variable" = "base08"
19−"number" = "base09"
19+"constant.numeric" = "base09"
2020"constant" = "base09"
2121"attributes" = "base09"
2222"type" = "base0A"
2323"ui.cursor.match" = { fg = "base0A", modifiers = ["underlined"] }
2424"strings" = "base0B"
25−"property" = "base0B"
26−"escape" = "base0C"
25+"variable.other.member" = "base0B"
26+"constant.character.escape" = "base0C"
2727"function" = "base0D"
2828"constructor" = "base0D"
2929"special" = "base0D"
runtime/themes/bogster.toml+3−3
@@ -8,7 +8,7 @@
88"punctuation.delimiter" = "#dc7759"
99"operator" = { fg = "#dc7759", modifiers = ["bold"] }
1010"special" = "#7fdc59"
11−"property" = "#c6b8ad"
11+"variable.other.member" = "#c6b8ad"
1212"variable" = "#c6b8ad"
1313"variable.parameter" = "#c6b8ad"
1414"type" = "#dc597f"
@@ -22,8 +22,8 @@
2222"constant" = "#59dcb7"
2323"constant.builtin" = "#59dcb7"
2424"string" = "#59dcb7"
25−"number" = "#59c0dc"
26−"escape" = { fg = "#7fdc59", modifiers = ["bold"] }
25+"constant.numeric" = "#59c0dc"
26+"constant.character.escape" = { fg = "#7fdc59", modifiers = ["bold"] }
2727"label" = "#59c0dc"
2828
2929"module" = "#d32c5d"
runtime/themes/dark_plus.toml+35−18
@@ -7,7 +7,7 @@
77"type.builtin" = { fg = "type" }
88"type.enum.variant" = { fg = "constant" }
99"constructor" = { fg = "constant" }
10−"property" = { fg = "variable" }
10+"variable.other.member" = { fg = "variable" }
1111
1212"keyword" = { fg = "keyword" }
1313"keyword.directive" = { fg = "keyword" }
@@ -31,47 +31,64 @@
3131"function.macro" = { fg = "keyword" }
3232"attribute" = { fg = "fn_declaration" }
3333
34−"comment" = { fg = "#6A9955" }
34+"comment" = { fg = "dark_green" }
3535
36−"string" = { fg = "#ce9178" }
37−"string.regexp" = { fg = "regex" }
38−"number" = { fg = "#b5cea8" }
39−"escape" = { fg = "#d7ba7d" }
36+"string" = { fg = "orange" }
37+"constant.character" = { fg = "orange" }
38+"string.regexp" = { fg = "gold" }
39+"constant.numeric" = { fg = "pale_green" }
40+"constant.character.escape" = { fg = "gold" }
4041
41−"ui.background" = { fg = "#d4d4d4", bg = "#1e1e1e" }
42+"ui.background" = { fg = "light_gray", bg = "dark_gray2" }
4243
4344"ui.window" = { bg = "widget" }
4445"ui.popup" = { bg = "widget" }
4546"ui.help" = { bg = "widget" }
4647"ui.menu.selected" = { bg = "widget" }
4748
49+# TODO: Alternate bg colour for `ui.cursor.match` and `ui.selection`.
4850"ui.cursor" = { fg = "cursor", modifiers = ["reversed"] }
4951"ui.cursor.primary" = { fg = "cursor", modifiers = ["reversed"] }
5052"ui.cursor.match" = { bg = "#3a3d41", modifiers = ["underlined"] }
5153
5254"ui.selection" = { bg = "#3a3d41" }
53−"ui.selection.primary" = { bg = "#264f78" }
55+"ui.selection.primary" = { bg = "dark_blue" }
5456
55−"ui.linenr" = { fg = "#858585" }
56−"ui.linenr.selected" = { fg = "#c6c6c6" }
57+"ui.linenr" = { fg = "dark_gray" }
58+"ui.linenr.selected" = { fg = "light_gray2" }
5759
58−"ui.statusline" = { fg = "#ffffff", bg = "#007acc" }
59−"ui.statusline.inactive" = { fg = "#ffffff", bg = "#007acc" }
60+"ui.statusline" = { fg = "white", bg = "blue" }
61+"ui.statusline.inactive" = { fg = "white", bg = "blue" }
6062
6163"ui.text" = { fg = "text", bg = "background" }
62−"ui.text.focus" = { fg = "#ffffff" }
64+"ui.text.focus" = { fg = "white" }
6365
64−"warning" = { fg = "#cca700" }
65−"error" = { fg = "#ff1212" }
66−"info" = { fg = "#75beff" }
67−"hint" = { fg = "#eeeeeeb3" }
66+"warning" = { fg = "gold2" }
67+"error" = { fg = "red" }
68+"info" = { fg = "light_blue" }
69+"hint" = { fg = "light_gray3" }
6870
6971diagnostic = { modifiers = ["underlined"] }
7072
7173[palette]
74+white = "#ffffff"
75+orange = "#ce9178"
76+gold = "#d7ba7d"
77+gold2 = "#cca700"
78+pale_green = "#b5cea8"
79+dark_green = "#6A9955"
80+light_gray = "#d4d4d4"
81+light_gray2 = "#c6c6c6"
82+light_gray3 = "#eeeeee"
83+dark_gray = "#858585"
84+dark_gray2 = "#1e1e1e"
85+blue = "#007acc"
86+light_blue = "#75beff"
87+dark_blue = "#264f78"
88+red = "#ff1212"
89+
7290type = "#4EC9B0"
7391keyword = "#569CD6"
74−regex = "#CE9178"
7592special = "#C586C0"
7693variable = "#9CDCFE"
7794fn_declaration = "#DCDCAA"
runtime/themes/everforest_dark.toml+3−4
@@ -8,16 +8,16 @@
88# Email: sainnhe@gmail.com
99# License: MIT License
1010
11−"escape" = "orange"
11+"constant.character.escape" = "orange"
1212"type" = "yellow"
1313"constant" = "purple"
14−"number" = "purple"
14+"constant.numeric" = "purple"
1515"string" = "grey2"
1616"comment" = "grey0"
1717"variable" = "fg"
1818"variable.builtin" = "blue"
1919"variable.parameter" = "fg"
20−"variable.property" = "fg"
20+"variable.other.member" = "fg"
2121"label" = "aqua"
2222"punctuation" = "grey2"
2323"punctuation.delimiter" = "grey2"
@@ -32,7 +32,6 @@
3232"attribute" = "aqua"
3333"constructor" = "yellow"
3434"module" = "blue"
35−"property" = "fg"
3635"special" = "orange"
3736
3837"ui.background" = { bg = "bg0" }
runtime/themes/gruvbox.toml+3−4
@@ -9,8 +9,7 @@
99"punctuation.delimiter" = "orange1"
1010"operator" = "purple1"
1111"special" = "purple0"
12−"property" = "blue1"
13−"variable.property" = "blue1"
12+"variable.other.member" = "blue1"
1413"variable" = "fg1"
1514"variable.builtin" = "orange1"
1615"variable.parameter" = "fg2"
@@ -24,8 +23,8 @@
2423"constant" = { fg = "purple1" }
2524"constant.builtin" = { fg = "purple1", modifiers = ["bold"] }
2625"string" = "green1"
27−"number" = "purple1"
28−"escape" = { fg = "fg2", modifiers = ["bold"] }
26+"constant.numeric" = "purple1"
27+"constant.character.escape" = { fg = "fg2", modifiers = ["bold"] }
2928"label" = "aqua1"
3029"module" = "aqua1"
3130
runtime/themes/ingrid.toml+3−3
@@ -8,7 +8,7 @@
88"punctuation.delimiter" = "#C97270"
99"operator" = { fg = "#D74E50", modifiers = ["bold"] }
1010"special" = "#D68482"
11−"property" = "#89BEB7"
11+"variable.other.member" = "#89BEB7"
1212"variable" = "#A6B6CE"
1313"variable.parameter" = "#89BEB7"
1414"type" = { fg = "#A6B6CE", modifiers = ["bold"] }
@@ -22,8 +22,8 @@
2222"constant" = "#D4A520"
2323"constant.builtin" = "#D4A520"
2424"string" = "#D74E50"
25−"number" = "#D74E50"
26−"escape" = { fg = "#D74E50", modifiers = ["bold"] }
25+"constant.numeric" = "#D74E50"
26+"constant.character.escape" = { fg = "#D74E50", modifiers = ["bold"] }
2727"label" = "#D68482"
2828
2929"module" = "#839A53"
runtime/themes/monokai.toml+4−3
@@ -7,7 +7,7 @@
77"type.builtin" = { fg = "#66D9EF" }
88"type.enum.variant" = { fg = "text" }
99"constructor" = { fg = "text" }
10−"property" = { fg = "variable" }
10+"variable.other.member" = { fg = "variable" }
1111
1212"keyword" = { fg = "keyword" }
1313"keyword.directive" = { fg = "keyword" }
@@ -34,9 +34,10 @@
3434"comment" = { fg = "#88846F" }
3535
3636"string" = { fg = "#e6db74" }
37+"constant.character" = { fg = "#e6db74" }
3738"string.regexp" = { fg = "regex" }
38−"number" = { fg = "#ae81ff" }
39−"escape" = { fg = "#ae81ff" }
39+"constant.numeric" = { fg = "#ae81ff" }
40+"constant.character.escape" = { fg = "#ae81ff" }
4041
4142"ui.background" = { fg = "text", bg = "background" }
4243
runtime/themes/nord.toml+3−3
@@ -59,7 +59,7 @@
5959# nord9 - operator, tags, units, punctuations
6060"punctuation.delimiter" = "nord9"
6161"operator" = { fg = "nord9" }
62−"property" = "nord9"
62+"variable.other.member" = "nord9"
6363
6464# nord10 - keywords, special
6565"keyword" = { fg = "nord10" }
@@ -76,13 +76,13 @@
7676
7777# nord13 - warnings, escape characters, regex
7878"warning" = "nord13"
79−"escape" = { fg = "nord13" }
79+"constant.character.escape" = { fg = "nord13" }
8080
8181# nord14 - strings
8282"string" = "nord14"
8383
8484# nord15 - integer, floating point
85−"number" = "nord15"
85+"constant.numeric" = "nord15"
8686
8787[palette]
8888nord0 = "#2e3440"
runtime/themes/rose_pine.toml+2−2
@@ -16,14 +16,14 @@
1616"operator" = "rose"
1717"ui.text.focus" = { fg = "base05" }
1818"variable" = "text"
19−"number" = "iris"
19+"constant.numeric" = "iris"
2020"constant" = "gold"
2121"attributes" = "gold"
2222"type" = "foam"
2323"ui.cursor.match" = { fg = "gold", modifiers = ["underlined"] }
2424"string" = "gold"
2525"property" = "foam"
26−"escape" = "subtle"
26+"constant.character.escape" = "subtle"
2727"function" = "rose"
2828"function.builtin" = "rose"
2929"function.method" = "foam"
theme.toml+1−1
@@ -6,7 +6,7 @@ punctuation = "lavender"
66"punctuation.delimiter" = "lavender"
77operator = "lilac"
88special = "honey"
9−property = "white"
9+variable.other.member = "white"
1010variable = "lavender"
1111# variable = "almond" # TODO: metavariables only
1212# "variable.parameter" = { fg = "lavender", modifiers = ["underlined"] }