From 2bd24cceb42fd4d714efcdeaa0d69afac725839d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Jun 2022 10:22:22 +0200 Subject: [PATCH] Add folds Unfortunately it seems like this is not really testable with the 'tree-sitter' tooling. If I want to check that this is working correctly, I should explore how to make use of, e.g., neovim to automate testing. --- queries/folds.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 queries/folds.scm diff --git a/queries/folds.scm b/queries/folds.scm new file mode 100644 index 0000000..6159129 --- /dev/null +++ b/queries/folds.scm @@ -0,0 +1,18 @@ +[ + (array_expression) + (record_expression) + (sequence_expression) + (if_expression) + (while_expression) + (for_expression) + (let_expression) + (function_declaration) + (primitive_declaration) +] @fold + +[ + (comment) + (string_literal) +] @ignore + +; vim: sw=2 foldmethod=marker