nvim-treesitter/queries/gdscript/folds.scm
Preston Knopp 36b1038a65
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>
2023-03-02 07:28:13 +00:00

25 lines
560 B
Scheme

[
; 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)