aboutsummaryrefslogtreecommitdiffstats
path: root/queries/usd
diff options
context:
space:
mode:
authorPham Huy Hoang <hoangtun0810@gmail.com>2024-01-06 15:05:50 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 (patch)
tree70bf645539882b88e6fa129cefd30986b89bbac3 /queries/usd
parentci: add query lint job (diff)
downloadnvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.gz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.bz2
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.lz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.xz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.zst
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.zip
chore: query formatting
Diffstat (limited to 'queries/usd')
-rw-r--r--queries/usd/folds.scm4
-rw-r--r--queries/usd/highlights.scm73
-rw-r--r--queries/usd/indents.scm31
3 files changed, 68 insertions, 40 deletions
diff --git a/queries/usd/folds.scm b/queries/usd/folds.scm
index c4815bd07..fd7d23999 100644
--- a/queries/usd/folds.scm
+++ b/queries/usd/folds.scm
@@ -1,3 +1 @@
-[
- (block)
-] @fold
+(block) @fold
diff --git a/queries/usd/highlights.scm b/queries/usd/highlights.scm
index 180b6d219..894d1613d 100644
--- a/queries/usd/highlights.scm
+++ b/queries/usd/highlights.scm
@@ -1,28 +1,42 @@
(None) @constant.builtin
+
(asset_path) @string.special.url
+
(attribute_property) @property
+
(bool) @boolean
+
(comment) @comment @spell
+
(custom) @function.builtin
+
(float) @number.float
+
(integer) @number
+
(orderer) @function.call
+
(prim_path) @string.special
+
(relationship_type) @type
+
(string) @string
+
(uniform) @function.builtin
+
(variant_set_definition) @keyword
-;; Prefer namespace highlighting, if any.
-;;
-;; e.g. `rel fizz` - `fizz` uses `@identifier`
-;; e.g. `rel foo:bar:fizz` - `foo` and `bar` use `@module` and `fizz` uses `@identifier`
-;;
+; Prefer namespace highlighting, if any.
+;
+; e.g. `rel fizz` - `fizz` uses `@identifier`
+; e.g. `rel foo:bar:fizz` - `foo` and `bar` use `@module` and `fizz` uses `@identifier`
+;
(identifier) @variable
+
(namespace_identifier) @module
+
(namespace_identifier
- (identifier) @module
-)
+ (identifier) @module)
[
"class"
@@ -30,16 +44,26 @@
"over"
] @keyword.function
-["(" ")" "[" "]" "{" "}"] @punctuation.bracket
-[":" ";" "."] @punctuation.delimiter
+[
+ "("
+ ")"
+ "["
+ "]"
+ "{"
+ "}"
+] @punctuation.bracket
[
- "="
-] @operator
+ ":"
+ ";"
+ "."
+] @punctuation.delimiter
+
+"=" @operator
(attribute_type) @type
-(
- (attribute_type) @type.builtin
+
+((attribute_type) @type.builtin
;format-ignore
(#any-of? @type.builtin
;; Reference: https://openusd.org/release/api/sdf_page_front.html
@@ -98,8 +122,7 @@
"Transform" "Transform[]"
"Vec3f" "Vec3f[]"))
-(
- (identifier) @keyword
+((identifier) @keyword
; format-ignore
(#any-of? @keyword
; Reference: https://openusd.org/release/api/sdf_page_front.html
@@ -159,20 +182,12 @@
; Prim metadata
"instanceable"))
-;; Common attribute metadata
-(
- (layer_offset
+; Common attribute metadata
+((layer_offset
(identifier) @keyword
- (#any-of? @keyword
-
- "offset"
- "scale"
- )
- )
-)
+ (#any-of? @keyword "offset" "scale")))
-;; Docstrings in USD
+; Docstrings in USD
(metadata
- (comment)*
- (string) @comment.documentation
-)
+ (comment)*
+ (string) @comment.documentation)
diff --git a/queries/usd/indents.scm b/queries/usd/indents.scm
index 78146d188..217d12d3f 100644
--- a/queries/usd/indents.scm
+++ b/queries/usd/indents.scm
@@ -11,14 +11,29 @@
(variant_set_definition) ; The {}s in `variantSet "foo" = { "vr1" { ... } "vr2" { ... } }`
] @indent.begin
-(block "}" @indent.end)
-(dictionary "}" @indent.end)
-(list "]" @indent.end)
-(list_proxy "]" @indent.end)
-(metadata ")" @indent.end)
-(timeSamples "}" @indent.end)
-(tuple ")" @indent.end)
-(variant_set_definition "}" @indent.end)
+(block
+ "}" @indent.end)
+
+(dictionary
+ "}" @indent.end)
+
+(list
+ "]" @indent.end)
+
+(list_proxy
+ "]" @indent.end)
+
+(metadata
+ ")" @indent.end)
+
+(timeSamples
+ "}" @indent.end)
+
+(tuple
+ ")" @indent.end)
+
+(variant_set_definition
+ "}" @indent.end)
[
")"