mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 03:56:52 -04:00
Update teal queries
This commit is contained in:
parent
9cfcae6a9c
commit
47fae4eff8
3 changed files with 13 additions and 13 deletions
|
|
@ -7,6 +7,6 @@
|
|||
(function_statement)
|
||||
(record_declaration)
|
||||
(enum_declaration)
|
||||
(functiondef)
|
||||
;(functiondef)
|
||||
(table_constructor)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -32,25 +32,23 @@
|
|||
|
||||
[ "," "." ":"] @punctuation.delimiter
|
||||
[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket
|
||||
("<" @punctuation.bracket
|
||||
. (typearg) . ("," (typearg))* .
|
||||
">" @punctuation.bracket)
|
||||
(typeargs ["<" ">"] @punctuation.bracket)
|
||||
|
||||
(identifier) @variable
|
||||
(boolean) @boolean
|
||||
(nil) @constant.builtin
|
||||
(varargs) @constant
|
||||
|
||||
; function stuffs
|
||||
(functiondef ["function" "end"] @keyword.function)
|
||||
;; function stuffs;
|
||||
|
||||
(function_statement [(function_name) (function_name (_))] @function)
|
||||
(function_statement (function_name) @function)
|
||||
(function_statement ["function" "end"] @keyword.function)
|
||||
|
||||
(function_call
|
||||
(identifier) @function . (arguments))
|
||||
|
||||
(arg_name) @parameter
|
||||
(arg
|
||||
name: (identifier) @parameter)
|
||||
|
||||
; type stuffs
|
||||
(type_declaration "type" @keyword)
|
||||
|
|
@ -59,12 +57,12 @@
|
|||
(function_type "function" @type)
|
||||
(record_name) @type
|
||||
(enum_name) @type
|
||||
(typearg) @parameter
|
||||
(typeargs (identifier) @parameter)
|
||||
|
||||
(table_constructor ["{" "}"] @constructor)
|
||||
(comment) @comment
|
||||
(string) @string
|
||||
(number) @number
|
||||
; TODO (label_statement) @label
|
||||
;; TODO (label_statement) @label
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
(var (identifier)) @definition.var)
|
||||
|
||||
(var_assignment
|
||||
(var (identifier)) @definition.associated @definition.var)
|
||||
(var (identifier)) @definition.var)
|
||||
|
||||
(arg_name) @definition.parameter
|
||||
(arg
|
||||
name: (identifier) @definition.parameter)
|
||||
(typeargs (identifier) @definition.type)
|
||||
|
||||
(functiondef) @scope
|
||||
;(functiondef) @scope
|
||||
((function_statement
|
||||
(function_name) @definition.function) @scope
|
||||
(#set! definition.function.scope "parent"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue