aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/qml/highlights.scm
blob: 11178fcdb722d1a10ac1d75fa1752a14b4ae4f5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
(comment) @comment

(ui_import
  source: _ @namespace
  version: _? @constant
  alias: _? @namespace)

(ui_pragma
  name: (identifier) @attribute
  value: (identifier)? @constant)

(ui_annotation
  "@" @punctuation
  type_name: _ @type)

;;; Declarations

(enum_declaration
  name: (identifier) @type)

(enum_assignment
  name: (identifier) @constant
  value: _ @constant)

(enum_body
  name: (identifier) @constant)

(ui_inline_component
  name: (identifier) @type)

(ui_object_definition
  type_name: _ @type)

(ui_object_definition_binding
  type_name: _ @type
  name: _ @variable.other.member)

(ui_property
  type: _ @type
  name: (identifier) @variable.other.member)

(ui_signal
  name: (identifier) @function)

(ui_signal_parameter
  name: (identifier) @variable.parameter
  type: _ @type)

(ui_signal_parameter
  type: _ @type
  name: (identifier) @variable.parameter);;; Properties and bindings

;;; Bindings

(ui_binding
  name: _ @variable.other.member)

;;; Other

[
  "("
  ")"
  "{"
  "}"
] @punctuation.bracket

(ui_list_property_type [
  "<"
  ">"
] @punctuation.bracket)

[
  ","
  "."
  ":"
] @punctuation.delimiter

[
  "as"
  "component"
  "default"
  "enum"
  "import"
  "on"
  "pragma"
  "property"
  "readonly"
  "required"
  "signal"
] @keyword