aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorAmaan Qureshi <amaanq12@gmail.com>2023-01-31 09:14:58 -0500
committerGitHub <noreply@github.com>2023-01-31 16:14:58 +0200
commite00952111e94f95800a32eeedb057e7ad365960c (patch)
tree401212555899760790771cd69cd2a613350dfc1d /queries
parentsimplify tests (diff)
downloadnvim-treesitter-e00952111e94f95800a32eeedb057e7ad365960c.tar
nvim-treesitter-e00952111e94f95800a32eeedb057e7ad365960c.tar.gz
nvim-treesitter-e00952111e94f95800a32eeedb057e7ad365960c.tar.bz2
nvim-treesitter-e00952111e94f95800a32eeedb057e7ad365960c.tar.lz
nvim-treesitter-e00952111e94f95800a32eeedb057e7ad365960c.tar.xz
nvim-treesitter-e00952111e94f95800a32eeedb057e7ad365960c.tar.zst
nvim-treesitter-e00952111e94f95800a32eeedb057e7ad365960c.zip
feat: add smithy (#4245)
Diffstat (limited to 'queries')
-rw-r--r--queries/smithy/highlights.scm114
1 files changed, 114 insertions, 0 deletions
diff --git a/queries/smithy/highlights.scm b/queries/smithy/highlights.scm
new file mode 100644
index 000000000..07ee328f1
--- /dev/null
+++ b/queries/smithy/highlights.scm
@@ -0,0 +1,114 @@
+; Preproc
+
+(control_key) @preproc
+
+; Namespace
+
+(namespace) @namespace
+
+; Includes
+
+[
+ "use"
+] @include
+
+; Builtins
+
+(primitive) @type.builtin
+[
+ "enum"
+ "intEnum"
+ "list"
+ "map"
+ "set"
+] @type.builtin
+
+; Fields (Members)
+
+; (field) @field
+
+(key_identifier) @field
+(shape_member
+ (field) @field)
+(operation_field) @field
+(operation_error_field) @field
+
+; Constants
+
+(enum_member
+ (enum_field) @constant)
+
+; Types
+
+(identifier) @type
+(structure_resource
+ (shape_id) @type)
+
+; Attributes
+
+(mixins
+ (shape_id) @attribute)
+(trait_statement
+ (shape_id (#set! "priority" 105)) @attribute)
+
+; Operators
+
+[
+ "@"
+ "-"
+ "="
+ ":="
+] @operator
+
+; Keywords
+
+[
+ "namespace"
+ "service"
+ "structure"
+ "operation"
+ "union"
+ "resource"
+ "metadata"
+ "apply"
+ "for"
+ "with"
+] @keyword
+
+; Literals
+
+(string) @string
+(escape_sequence) @string.escape
+
+(number) @number
+
+(float) @float
+
+(boolean) @boolean
+
+(null) @constant.builtin
+
+; Misc
+
+[
+ "$"
+ "#"
+] @punctuation.special
+
+["{" "}"] @punctuation.bracket
+
+["(" ")"] @punctuation.bracket
+
+["[" "]"] @punctuation.bracket
+
+[
+ ":"
+ "."
+] @punctuation.delimiter
+
+; Comments
+
+[
+ (comment)
+ (documentation_comment)
+] @comment @spell