mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02:00
feat: import statement folds for common languages
This commit is contained in:
parent
f58cae6c22
commit
9a47a523e3
8 changed files with 18 additions and 4 deletions
|
@ -16,6 +16,7 @@
|
|||
(preproc_function_def)
|
||||
(initializer_list)
|
||||
(gnu_asm_expression)
|
||||
(preproc_include)+
|
||||
] @fold
|
||||
|
||||
(compound_statement
|
||||
|
|
|
@ -8,4 +8,7 @@ accessors: (accessor_list) @fold
|
|||
|
||||
initializer: (initializer_expression) @fold
|
||||
|
||||
(block) @fold
|
||||
[
|
||||
(block)
|
||||
(using_directive)+
|
||||
] @fold
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
(rule_set) @fold
|
||||
[
|
||||
(rule_set)
|
||||
(import_statement)+
|
||||
] @fold
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
(switch_statement)
|
||||
(switch_case)
|
||||
(switch_default)
|
||||
(import_statement)
|
||||
(import_statement)+
|
||||
(if_statement)
|
||||
(try_statement)
|
||||
(catch_clause)
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
(exp_apply)
|
||||
(exp_do)
|
||||
(function)
|
||||
(import)+
|
||||
] @fold
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
(constructor_declaration)
|
||||
(argument_list)
|
||||
(annotation_argument_list)
|
||||
(import_declaration)+
|
||||
] @fold
|
||||
|
|
|
@ -21,3 +21,8 @@
|
|||
(dictionary)
|
||||
(string)
|
||||
] @fold
|
||||
|
||||
[
|
||||
(import_statement)
|
||||
(import_from_statement)
|
||||
]+ @fold
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
(type_item)
|
||||
(union_item)
|
||||
(const_item)
|
||||
(use_declaration)
|
||||
(use_declaration)+
|
||||
(let_declaration)
|
||||
(loop_expression)
|
||||
(for_expression)
|
||||
|
|
Loading…
Reference in a new issue