@@ -0,0 +1,102 @@
1+; Queries are taken from: https://github.com/indoorvivants/tree-sitter-smithy/blob/main/queries/highlights.scm
2+; Preproc
3+(control_key) @keyword.directive
4+
5+; Namespace
6+(namespace) @namespace
7+
8+; Includes
9+[
10+ "use"
11+] @keyword.control.import
12+
13+; Builtins
14+(primitive) @type.builtin
15+[
16+ "enum"
17+ "intEnum"
18+ "list"
19+ "map"
20+ "set"
21+] @type.builtin
22+
23+; Fields (Members)
24+; (field) @variable.other.member
25+
26+(key_identifier) @variable.other.member
27+(shape_member
28+ (field) @variable.other.member)
29+(operation_field) @variable.other.member
30+(operation_error_field) @variable.other.member
31+
32+; Constants
33+(enum_member
34+ (enum_field) @type.enum)
35+
36+; Types
37+(identifier) @type
38+(structure_resource
39+ (shape_id) @type)
40+
41+; Attributes
42+(mixins
43+ (shape_id) @attribute)
44+(trait_statement
45+ (shape_id) @attribute)
46+
47+; Operators
48+[
49+ "@"
50+ "-"
51+ "="
52+ ":="
53+] @operator
54+
55+; Keywords
56+[
57+ "namespace"
58+ "service"
59+ "structure"
60+ "operation"
61+ "union"
62+ "resource"
63+ "metadata"
64+ "apply"
65+ "for"
66+ "with"
67+] @keyword
68+
69+; Literals
70+(string) @string
71+(escape_sequence) @constant.character.escape
72+
73+(number) @constant.numeric
74+
75+(float) @constant.numeric.float
76+
77+(boolean) @constant.builtin.boolean
78+
79+(null) @constant.builtin
80+
81+; Misc
82+[
83+ "$"
84+ "#"
85+] @punctuation.special
86+
87+["{" "}"] @punctuation.bracket
88+
89+["(" ")"] @punctuation.bracket
90+
91+["[" "]"] @punctuation.bracket
92+
93+[
94+ ":"
95+ "."
96+] @punctuation.delimiter
97+
98+; Comments
99+[
100+ (comment)
101+ (documentation_comment)
102+] @comment