Add USD language (#278)

* Added USD context support

* Added USD as a supported language

* Added more USD context rules

* Added test/test.usd
This commit is contained in:
Colin Kennedy 2023-05-16 00:13:56 -07:00 committed by GitHub
parent f24a86c322
commit e3535ff78a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 117 additions and 0 deletions

View file

@ -73,6 +73,7 @@ use 'nvim-treesitter/nvim-treesitter-context'
- [x] `toml`
- [x] `tsx`
- [x] `typescript`
- [x] `usd`
- [x] `verilog`
- [x] `vim`
- [x] `yaml`

5
queries/usd/context.scm Normal file
View file

@ -0,0 +1,5 @@
([
(prim_definition)
(variant_set_definition)
(variant)
] @context)

111
test/test.usd Normal file
View file

@ -0,0 +1,111 @@
def Xform "thing"
{
def "thing" {}
def Scope "child"
{
variantSet "thing" = {
"stuff" {
def Scope "more_child_001"
{
}
}
}
}
}