diff --git a/book/src/themes.md b/book/src/themes.md index 5a4d040384c2a..53fdc32eba34b 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -129,7 +129,7 @@ We use a similar set of scopes as - `variable` - Variables - `builtin` - Reserved language variables (`self`, `this`, `super`, etc) - `parameter` - Function parameters - - `property` + - `field` - Fields of composite data types (e.g. structs, unions) - `function` (TODO: ?) - `label` diff --git a/runtime/queries/bash/highlights.scm b/runtime/queries/bash/highlights.scm index 754faedac2d5d..2f9afc07002e5 100644 --- a/runtime/queries/bash/highlights.scm +++ b/runtime/queries/bash/highlights.scm @@ -7,7 +7,7 @@ (command_name) @function -(variable_name) @property +(variable_name) @variable.field [ "case" diff --git a/runtime/queries/c-sharp/highlights.scm b/runtime/queries/c-sharp/highlights.scm index b76f4e6017d80..a5e9797acc8aa 100644 --- a/runtime/queries/c-sharp/highlights.scm +++ b/runtime/queries/c-sharp/highlights.scm @@ -20,7 +20,7 @@ ] @type.builtin ;; Enum -(enum_member_declaration (identifier) @variable.property) +(enum_member_declaration (identifier) @variable.field) ;; Literals [ diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm index 2c42710f966f8..e8541f52c3a94 100644 --- a/runtime/queries/c/highlights.scm +++ b/runtime/queries/c/highlights.scm @@ -73,7 +73,7 @@ (preproc_function_def name: (identifier) @function.special) -(field_identifier) @property +(field_identifier) @variable.field (statement_identifier) @label (type_identifier) @type (primitive_type) @type diff --git a/runtime/queries/css/highlights.scm b/runtime/queries/css/highlights.scm index 763661af7616f..c6dc8694dd9d4 100644 --- a/runtime/queries/css/highlights.scm +++ b/runtime/queries/css/highlights.scm @@ -26,11 +26,11 @@ (pseudo_element_selector (tag_name) @attribute) (pseudo_class_selector (class_name) @attribute) -(class_name) @property -(id_name) @property -(namespace_name) @property -(property_name) @property -(feature_name) @property +(class_name) @variable.field +(id_name) @variable.field +(namespace_name) @variable.field +(property_name) @variable.field +(feature_name) @variable.field (attribute_name) @attribute diff --git a/runtime/queries/elixir/highlights.scm b/runtime/queries/elixir/highlights.scm index 08e09f37a8a4f..b41bc2c349d06 100644 --- a/runtime/queries/elixir/highlights.scm +++ b/runtime/queries/elixir/highlights.scm @@ -39,13 +39,13 @@ ; * module attribute (unary_operator - operator: "@" @variable.property + operator: "@" @variable.field operand: [ - (identifier) @variable.property + (identifier) @variable.field (call - target: (identifier) @variable.property) - (boolean) @variable.property - (nil) @variable.property + target: (identifier) @variable.field) + (boolean) @variable.field + (nil) @variable.field ]) ; * capture operator diff --git a/runtime/queries/go/highlights.scm b/runtime/queries/go/highlights.scm index 3129c4b2be231..fb22f23566e71 100644 --- a/runtime/queries/go/highlights.scm +++ b/runtime/queries/go/highlights.scm @@ -25,7 +25,7 @@ (variadic_parameter_declaration (identifier) @variable.parameter) (type_identifier) @type -(field_identifier) @property +(field_identifier) @variable.field (identifier) @variable (package_identifier) @variable diff --git a/runtime/queries/javascript/highlights.scm b/runtime/queries/javascript/highlights.scm index e29829bfca08b..b11219f60a085 100644 --- a/runtime/queries/javascript/highlights.scm +++ b/runtime/queries/javascript/highlights.scm @@ -65,7 +65,7 @@ ; Properties ;----------- -(property_identifier) @property +(property_identifier) @variable.field ; Literals ;--------- diff --git a/runtime/queries/julia/highlights.scm b/runtime/queries/julia/highlights.scm index 7b7d426c1c91b..49e6bf00a80fd 100644 --- a/runtime/queries/julia/highlights.scm +++ b/runtime/queries/julia/highlights.scm @@ -15,7 +15,7 @@ (field_expression (identifier) - (identifier) @field .) + (identifier) @variable.field .) (function_definition name: (identifier) @function) diff --git a/runtime/queries/ledger/highlights.scm b/runtime/queries/ledger/highlights.scm index 86c609c2a9a20..342fd3a177e95 100644 --- a/runtime/queries/ledger/highlights.scm +++ b/runtime/queries/ledger/highlights.scm @@ -9,7 +9,7 @@ (quantity) ] @number -((account) @field) +((account) @variable.field) ((commodity) @text.literal) "include" @include diff --git a/runtime/queries/lua/highlights.scm b/runtime/queries/lua/highlights.scm index 40c2be7098765..1028cdbedbbff 100644 --- a/runtime/queries/lua/highlights.scm +++ b/runtime/queries/lua/highlights.scm @@ -153,11 +153,11 @@ (number) @number (label_statement) @label ; A bit of a tricky one, this will only match field names -(field . (identifier) @property (_)) +(field . (identifier) @variable.field (_)) (shebang) @comment ;; Property -(property_identifier) @property +(property_identifier) @variable.field ;; Variable (identifier) @variable diff --git a/runtime/queries/nix/highlights.scm b/runtime/queries/nix/highlights.scm index 741b73b5d42c8..089c5d0f73e6d 100644 --- a/runtime/queries/nix/highlights.scm +++ b/runtime/queries/nix/highlights.scm @@ -66,8 +66,8 @@ (binary operator: _ @operator) -(attr_identifier) @property -(inherit attrs: (attrs_inherited (identifier) @property) ) +(attr_identifier) @variable.field +(inherit attrs: (attrs_inherited (identifier) @variable.field) ) [ ";" diff --git a/runtime/queries/ocaml/highlights.scm b/runtime/queries/ocaml/highlights.scm index 160f2cb415ded..b8008a03f4617 100644 --- a/runtime/queries/ocaml/highlights.scm +++ b/runtime/queries/ocaml/highlights.scm @@ -51,7 +51,7 @@ ; Properties ;----------- -[(label_name) (field_name) (instance_variable_name)] @property +[(label_name) (field_name) (instance_variable_name)] @variable.field ; Constants ;---------- @@ -145,7 +145,7 @@ ; Attributes ;----------- -(attribute_id) @property +(attribute_id) @variable.field ; Comments ;--------- diff --git a/runtime/queries/php/highlights.scm b/runtime/queries/php/highlights.scm index 02904555875c6..59aaf76f8ad6e 100644 --- a/runtime/queries/php/highlights.scm +++ b/runtime/queries/php/highlights.scm @@ -30,12 +30,12 @@ ; Member (property_element - (variable_name) @property) + (variable_name) @variable.field) (member_access_expression - name: (variable_name (name)) @property) + name: (variable_name (name)) @variable.field) (member_access_expression - name: (name) @property) + name: (name) @variable.field) ; Variables diff --git a/runtime/queries/protobuf/highlights.scm b/runtime/queries/protobuf/highlights.scm index cd021be1ac698..f4f97106f4294 100644 --- a/runtime/queries/protobuf/highlights.scm +++ b/runtime/queries/protobuf/highlights.scm @@ -34,7 +34,7 @@ [ (fieldName) (optionName) -] @property +] @variable.field (enumVariantName) @type.enum.variant (fullIdent) @namespace diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm index f64fecb2c757d..d506555e5666b 100644 --- a/runtime/queries/python/highlights.scm +++ b/runtime/queries/python/highlights.scm @@ -29,7 +29,7 @@ name: (identifier) @function) (identifier) @variable -(attribute attribute: (identifier) @property) +(attribute attribute: (identifier) @variable.field) (type (identifier) @type) ; Literals diff --git a/runtime/queries/ruby/highlights.scm b/runtime/queries/ruby/highlights.scm index 8617d6f0c4f21..b36b851c83cb4 100644 --- a/runtime/queries/ruby/highlights.scm +++ b/runtime/queries/ruby/highlights.scm @@ -55,7 +55,7 @@ [ (class_variable) (instance_variable) -] @property +] @variable.field ((identifier) @constant.builtin (#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$")) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 956a5dacddfa0..95b93638f53f9 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -40,10 +40,10 @@ (enum_variant (identifier) @type.enum.variant) (field_initializer - (field_identifier) @property) + (field_identifier) @variable.field) (shorthand_field_initializer - (identifier) @variable.property) -(shorthand_field_identifier) @variable.property + (identifier) @variable.field) +(shorthand_field_identifier) @variable.field (lifetime "'" @label @@ -336,4 +336,4 @@ (type_identifier) @type (identifier) @variable -(field_identifier) @property +(field_identifier) @variable.field diff --git a/runtime/queries/svelte/highlights.scm b/runtime/queries/svelte/highlights.scm index 4c6f5f3567ca7..9ad88ab23cbca 100644 --- a/runtime/queries/svelte/highlights.scm +++ b/runtime/queries/svelte/highlights.scm @@ -29,7 +29,7 @@ (#match? @_attr "^(href|src)$")) (tag_name) @tag -(attribute_name) @property +(attribute_name) @variable.field (erroneous_end_tag_name) @error (comment) @comment diff --git a/runtime/queries/toml/highlights.scm b/runtime/queries/toml/highlights.scm index e4d6966fcbcb3..84c3c0e097b50 100644 --- a/runtime/queries/toml/highlights.scm +++ b/runtime/queries/toml/highlights.scm @@ -1,7 +1,7 @@ ; Properties ;----------- -(bare_key) @property +(bare_key) @variable.field (quoted_key) @string ; Literals diff --git a/runtime/queries/tsq/highlights.scm b/runtime/queries/tsq/highlights.scm index 9ba5699a86991..61127d88d8d37 100644 --- a/runtime/queries/tsq/highlights.scm +++ b/runtime/queries/tsq/highlights.scm @@ -35,7 +35,7 @@ (comment) @comment -(field_name) @property +(field_name) @variable.field (capture) @label diff --git a/runtime/queries/yaml/highlights.scm b/runtime/queries/yaml/highlights.scm index 2955a4ce0fdf4..b71678391f71a 100644 --- a/runtime/queries/yaml/highlights.scm +++ b/runtime/queries/yaml/highlights.scm @@ -1,5 +1,5 @@ -(block_mapping_pair key: (_) @property) -(flow_mapping (_ key: (_) @property)) +(block_mapping_pair key: (_) @variable.field) +(flow_mapping (_ key: (_) @variable.field)) (boolean_scalar) @constant.builtin.boolean (null_scalar) @constant.builtin (double_quote_scalar) @string diff --git a/runtime/queries/zig/highlights.scm b/runtime/queries/zig/highlights.scm index 404a8682a6fdd..e47afad9f9bd2 100644 --- a/runtime/queries/zig/highlights.scm +++ b/runtime/queries/zig/highlights.scm @@ -14,7 +14,7 @@ parameter: (IDENTIFIER) @variable.parameter [ field_member: (IDENTIFIER) field_access: (IDENTIFIER) -] @variable.property +] @variable.field ;; assume TitleCase is a type (