Added USD syntax tree support

This commit is contained in:
Colin Kennedy 2023-04-29 12:19:12 -07:00
parent 00cac8e96f
commit 77ef86ecc9
2 changed files with 22 additions and 0 deletions

View file

@ -316,6 +316,13 @@ M.typescript = {
end,
}
M.usd = {
postprocess = function(bufnr, item, match)
item.name = item.name:gsub("^\"", "")
item.name = item.name:gsub("\"$", "")
end
}
M.latex = {
postprocess = function(bufnr, item, match)
local type_node = (utils.get_at_path(match, "type") or {}).node

15
queries/usd/aerial.scm Normal file
View file

@ -0,0 +1,15 @@
; (prim_definition
; (string) @name
; (#match? @name "\"([a-zA-Z0-9]+)\"")
; (#set! "kind" "Class")
; ) @type
(prim_definition
(string) @name
(#offset! @name 0 1 0 -1)
(#set! "kind" "Class")
) @type
; ((identifier) @constant (#offset! @constant 0 1 0 -1))
; (
; (identifier) @constant
; (#match? @constant "^[A-Z][A-Z_]+")
; )