mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 23:10:11 -04:00
add gdscript
This commit is contained in:
parent
57ba843d18
commit
5236768c33
3 changed files with 46 additions and 0 deletions
27
queries/gdscript/highlights.scm
Normal file
27
queries/gdscript/highlights.scm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
(identifier) @variable
|
||||
|
||||
(name) @variable
|
||||
(type) @type
|
||||
(comment) @comment
|
||||
|
||||
(enum_definition
|
||||
(name) @constant) @Statement
|
||||
|
||||
(function_definition
|
||||
(name) @function
|
||||
(parameters
|
||||
(identifier)* @parameter) @punctuation.bracket) @Statement
|
||||
|
||||
(return_statement) @Statement
|
||||
|
||||
(variable_statement
|
||||
(inferred_type)? @operator) @Statement
|
||||
|
||||
(call (identifier) @function) @punctuation.bracket
|
||||
(attribute (attribute_call (identifier) @function) @punctuation.bracket)
|
||||
|
||||
; simple items
|
||||
[ (binary_operator) (comparison_operator) ] @operator
|
||||
[ (false) (true) ] @boolean
|
||||
(string) @string
|
||||
(integer) @number
|
||||
10
queries/gdscript/locals.scm
Normal file
10
queries/gdscript/locals.scm
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(function_definition) @definition.function
|
||||
|
||||
[
|
||||
(extends_statement)
|
||||
(variable_statement)
|
||||
(expression_statement)
|
||||
(if_statement)
|
||||
(function_definition)
|
||||
(body)
|
||||
] @scope
|
||||
Loading…
Add table
Add a link
Reference in a new issue