aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Gustafson <degustaf@gmail.com>2024-07-03 03:49:13 -0400
committerGitHub <noreply@github.com>2024-07-03 09:49:13 +0200
commit0209151fd236016dd217168a61bd9197b1a1b272 (patch)
tree72edcbbb136b068cfa9a9137a70bb78866e5e48d
parentfeat: add prolog and problog parser and queries (#6810) (diff)
downloadnvim-treesitter-0209151fd236016dd217168a61bd9197b1a1b272.tar
nvim-treesitter-0209151fd236016dd217168a61bd9197b1a1b272.tar.gz
nvim-treesitter-0209151fd236016dd217168a61bd9197b1a1b272.tar.bz2
nvim-treesitter-0209151fd236016dd217168a61bd9197b1a1b272.tar.lz
nvim-treesitter-0209151fd236016dd217168a61bd9197b1a1b272.tar.xz
nvim-treesitter-0209151fd236016dd217168a61bd9197b1a1b272.tar.zst
nvim-treesitter-0209151fd236016dd217168a61bd9197b1a1b272.zip
feat(elm): add folds queries
-rw-r--r--queries/elm/folds.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/queries/elm/folds.scm b/queries/elm/folds.scm
new file mode 100644
index 000000000..56987d9f9
--- /dev/null
+++ b/queries/elm/folds.scm
@@ -0,0 +1,14 @@
+((function_call_expr) @_fn
+ (#not-has-parent? @_fn parenthesized_expr)) @fold
+
+[
+ (case_of_branch)
+ (case_of_expr)
+ (value_declaration)
+ (type_declaration)
+ (type_alias_declaration)
+ (list_expr)
+ (record_expr)
+ (parenthesized_expr)
+ (import_clause)+
+] @fold