mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
Update gdscript queries (#4405)
* locals(gdscript): update locals * folds(gdscript): add folds * indents(gdscript): update indents with notes * highlights(gdscript): update highlights * docs(gdscript): add gdscript maintainer * indents(gdscript): add ERROR auto indent Co-authored-by: Amaan Qureshi <amaanq12@gmail.com> * highlights(gdscript): use text.uri for get_node and node_path * highlights(gdscript): add "@" of annotation as attribute * highlights(gdscript): use keyword.operator for "new", match all attribute_call * highlights(gdscript): update (underscore) and (pattern_open_ending) --------- Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
parent
b145021499
commit
36b1038a65
5 changed files with 412 additions and 35 deletions
25
queries/gdscript/folds.scm
Normal file
25
queries/gdscript/folds.scm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[
|
||||
; Body fold will "join" the next adjacent fold into a SUPER fold.
|
||||
; This is an issue with the grammar.
|
||||
; (body)
|
||||
|
||||
(if_statement)
|
||||
(elif_clause)
|
||||
(else_clause)
|
||||
(for_statement)
|
||||
(while_statement)
|
||||
(class_definition)
|
||||
(enum_definition)
|
||||
(match_statement)
|
||||
(pattern_section)
|
||||
(function_definition)
|
||||
(lambda)
|
||||
(constructor_definition)
|
||||
] @fold
|
||||
|
||||
; It's nice to be able to fold the if/elif/else clauses and the entire
|
||||
; if_statement.
|
||||
(if_statement (body) @fold)
|
||||
|
||||
; Fold strings that are probably doc strings.
|
||||
(expression_statement (string) @fold)
|
||||
Loading…
Add table
Add a link
Reference in a new issue