mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
feat(treesitter): upstream foldexpr from nvim-treesitter
This commit is contained in:
19
runtime/queries/c/folds.scm
Normal file
19
runtime/queries/c/folds.scm
Normal file
@ -0,0 +1,19 @@
|
||||
[
|
||||
(for_statement)
|
||||
(if_statement)
|
||||
(while_statement)
|
||||
(switch_statement)
|
||||
(case_statement)
|
||||
(function_definition)
|
||||
(struct_specifier)
|
||||
(enum_specifier)
|
||||
(comment)
|
||||
(preproc_if)
|
||||
(preproc_elif)
|
||||
(preproc_else)
|
||||
(preproc_ifdef)
|
||||
(initializer_list)
|
||||
] @fold
|
||||
|
||||
(compound_statement
|
||||
(compound_statement) @fold)
|
10
runtime/queries/lua/folds.scm
Normal file
10
runtime/queries/lua/folds.scm
Normal file
@ -0,0 +1,10 @@
|
||||
[
|
||||
(do_statement)
|
||||
(while_statement)
|
||||
(repeat_statement)
|
||||
(if_statement)
|
||||
(for_statement)
|
||||
(function_declaration)
|
||||
(function_definition)
|
||||
(table_constructor)
|
||||
] @fold
|
4
runtime/queries/vim/folds.scm
Normal file
4
runtime/queries/vim/folds.scm
Normal file
@ -0,0 +1,4 @@
|
||||
[
|
||||
(if_statement)
|
||||
(function_definition)
|
||||
] @fold
|
Reference in New Issue
Block a user