diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-02-23 17:05:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 17:05:20 +0000 |
commit | 1df3f5ec6aca24cbe7b78ead5c37ad06a65c84e8 (patch) | |
tree | d1523f1b7ef2a813859572ba0bdce2874de82699 /runtime/queries | |
parent | 8c339aa04b2a1ca99a297b2eada8ebc6218f5f1c (diff) | |
download | rneovim-1df3f5ec6aca24cbe7b78ead5c37ad06a65c84e8.tar.gz rneovim-1df3f5ec6aca24cbe7b78ead5c37ad06a65c84e8.tar.bz2 rneovim-1df3f5ec6aca24cbe7b78ead5c37ad06a65c84e8.zip |
feat(treesitter): upstream foldexpr from nvim-treesitter
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/c/folds.scm | 19 | ||||
-rw-r--r-- | runtime/queries/lua/folds.scm | 10 | ||||
-rw-r--r-- | runtime/queries/vim/folds.scm | 4 |
3 files changed, 33 insertions, 0 deletions
diff --git a/runtime/queries/c/folds.scm b/runtime/queries/c/folds.scm new file mode 100644 index 0000000000..80c3039b6b --- /dev/null +++ b/runtime/queries/c/folds.scm @@ -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) diff --git a/runtime/queries/lua/folds.scm b/runtime/queries/lua/folds.scm new file mode 100644 index 0000000000..d8f0b42df3 --- /dev/null +++ b/runtime/queries/lua/folds.scm @@ -0,0 +1,10 @@ +[ + (do_statement) + (while_statement) + (repeat_statement) + (if_statement) + (for_statement) + (function_declaration) + (function_definition) + (table_constructor) +] @fold diff --git a/runtime/queries/vim/folds.scm b/runtime/queries/vim/folds.scm new file mode 100644 index 0000000000..4c99735836 --- /dev/null +++ b/runtime/queries/vim/folds.scm @@ -0,0 +1,4 @@ +[ + (if_statement) + (function_definition) +] @fold |