branch: elpa/treesit-fold
commit 5e956f74dc4863aa2244caf854a30f741c95a899
Author: Jen-Chieh Shen <[email protected]>
Commit: Jen-Chieh Shen <[email protected]>
Support python comment and document string
---
tree-sitter-fold-parsers.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tree-sitter-fold-parsers.el b/tree-sitter-fold-parsers.el
index a4cf67e763..1a3945531a 100644
--- a/tree-sitter-fold-parsers.el
+++ b/tree-sitter-fold-parsers.el
@@ -159,7 +159,11 @@
(defun tree-sitter-fold-parsers-python ()
"Rule sets for Python."
'((function_definition . tree-sitter-fold-range-python)
- (class_definition . tree-sitter-fold-range-python)))
+ (class_definition . tree-sitter-fold-range-python)
+ (list . tree-sitter-fold-range-seq)
+ (comment
+ . (lambda (node offset)
+ (tree-sitter-fold-range-line-comment node offset "#")))))
(defun tree-sitter-fold-parsers-r ()
"Rule sets for R."