Skip to content

Commit

Permalink
updated theme scopes
Browse files Browse the repository at this point in the history
variable.property -> variable.field
property -> variable.field
  • Loading branch information
kirawi committed Oct 23, 2021
1 parent 0cb5e0b commit c7d8f86
Show file tree
Hide file tree
Showing 23 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion book/src/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/bash/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

(command_name) @function

(variable_name) @property
(variable_name) @variable.field

[
"case"
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/c-sharp/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
] @type.builtin

;; Enum
(enum_member_declaration (identifier) @variable.property)
(enum_member_declaration (identifier) @variable.field)

;; Literals
[
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/c/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions runtime/queries/css/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions runtime/queries/elixir/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/go/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/javascript/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
; Properties
;-----------

(property_identifier) @property
(property_identifier) @variable.field

; Literals
;---------
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/julia/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

(field_expression
(identifier)
(identifier) @field .)
(identifier) @variable.field .)

(function_definition
name: (identifier) @function)
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/ledger/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(quantity)
] @number

((account) @field)
((account) @variable.field)
((commodity) @text.literal)

"include" @include
Expand Down
4 changes: 2 additions & 2 deletions runtime/queries/lua/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions runtime/queries/nix/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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) )

[
";"
Expand Down
4 changes: 2 additions & 2 deletions runtime/queries/ocaml/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
; Properties
;-----------

[(label_name) (field_name) (instance_variable_name)] @property
[(label_name) (field_name) (instance_variable_name)] @variable.field

; Constants
;----------
Expand Down Expand Up @@ -145,7 +145,7 @@
; Attributes
;-----------

(attribute_id) @property
(attribute_id) @variable.field

; Comments
;---------
Expand Down
6 changes: 3 additions & 3 deletions runtime/queries/php/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/protobuf/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
[
(fieldName)
(optionName)
] @property
] @variable.field
(enumVariantName) @type.enum.variant

(fullIdent) @namespace
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/python/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
name: (identifier) @function)

(identifier) @variable
(attribute attribute: (identifier) @property)
(attribute attribute: (identifier) @variable.field)
(type (identifier) @type)

; Literals
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/ruby/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
[
(class_variable)
(instance_variable)
] @property
] @variable.field

((identifier) @constant.builtin
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
Expand Down
8 changes: 4 additions & 4 deletions runtime/queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -336,4 +336,4 @@

(type_identifier) @type
(identifier) @variable
(field_identifier) @property
(field_identifier) @variable.field
2 changes: 1 addition & 1 deletion runtime/queries/svelte/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/toml/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Properties
;-----------

(bare_key) @property
(bare_key) @variable.field
(quoted_key) @string

; Literals
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/tsq/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

(comment) @comment

(field_name) @property
(field_name) @variable.field

(capture) @label

Expand Down
4 changes: 2 additions & 2 deletions runtime/queries/yaml/highlights.scm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/zig/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameter: (IDENTIFIER) @variable.parameter
[
field_member: (IDENTIFIER)
field_access: (IDENTIFIER)
] @variable.property
] @variable.field

;; assume TitleCase is a type
(
Expand Down

0 comments on commit c7d8f86

Please sign in to comment.