[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 1d690b8d06 267/417: feat(python): Support ass
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 1d690b8d06 267/417: feat(python): Support assignment string |
Date: |
Mon, 1 Jul 2024 10:02:33 -0400 (EDT) |
branch: elpa/treesit-fold
commit 1d690b8d06b0b4d6c22ef1e6c71011900492028d
Author: JenChieh <jcs090218@gmail.com>
Commit: JenChieh <jcs090218@gmail.com>
feat(python): Support assignment string
---
ts-fold-parsers.el | 7 ++++---
ts-fold.el | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index d54fb55f50..43a24f96ab 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -54,7 +54,8 @@
(declare-function ts-fold-range-lua-do-loop "ts-fold.el")
(declare-function ts-fold-range-lua-repeat "ts-fold.el")
(declare-function ts-fold-range-ocaml "ts-fold.el")
-(declare-function ts-fold-range-python "ts-fold.el")
+(declare-function ts-fold-range-python-def "ts-fold.el")
+(declare-function ts-fold-range-python-expression-statement "ts-fold.el")
(declare-function ts-fold-range-ruby-class-def "ts-fold.el")
(declare-function ts-fold-range-ruby-if "ts-fold.el")
(declare-function ts-fold-range-rust-macro "ts-fold.el")
@@ -225,8 +226,8 @@
(defun ts-fold-parsers-python ()
"Rule set for Python."
- '((function_definition . ts-fold-range-python)
- (class_definition . ts-fold-range-python)
+ '((function_definition . ts-fold-range-python-def)
+ (class_definition . ts-fold-range-python-def)
(list . ts-fold-range-seq)
(dictionary . ts-fold-range-seq)
(expression_statement . ts-fold-range-python-expression-statement)
diff --git a/ts-fold.el b/ts-fold.el
index 92027a0de1..c826523cfe 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -97,7 +97,7 @@
FUNCTION is used to determine where the beginning and end for
FOLDABLE-NODE-TYPE
in MAJOR-MODE. It should take a single argument (the syntax node with type
FOLDABLE-NODE-TYPE) and return the buffer positions of the beginning and end of
-the fold in a cons cell. See `ts-fold-range-python' for an example."
+the fold in a cons cell. See `ts-fold-range-python-def' for an example."
:type '(alist :key-type symbol
:value-type (alist :key-type symbol :value-type function))
:group 'ts-fold)
@@ -602,7 +602,7 @@ more information."
;;- OCaml
-(defun ts-fold-range-python (node offset)
+(defun ts-fold-range-python-def (node offset)
"Define fold range for `function_definition' and `class_definition'.
For arguments NODE and OFFSET, see function `ts-fold-range-seq' for
@@ -621,7 +621,7 @@ more information."
For arguments NODE and OFFSET, see function `ts-fold-range-seq' for
more information."
- (when-let* ((string-node (car (ts-fold-find-children node "string")))
+ (when-let* ((string-node (car (ts-fold-find-children-traverse node
"string")))
;; the colon is an anonymous node after return_type or
parameters node
(beg (tsc-node-start-position string-node))
(end (tsc-node-end-position node)))
- [nongnu] elpa/treesit-fold a1b5e97fa0 132/417: Improve doc, (continued)
- [nongnu] elpa/treesit-fold a1b5e97fa0 132/417: Improve doc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 49aff53680 136/417: Add comment, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 5e956f74dc 148/417: Support python comment and document string, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 68c7954b3a 155/417: Apply more accurate c-like comment, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold b2222f0f7f 159/417: Update list, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 68d16a9bc9 166/417: Rename to ts-fold, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d556beb204 172/417: Merge pull request #4 from rynffoll/feature/add-support-evil-toggle-fold, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 52d36972ef 218/417: chore(list): sort language alphabetically (#12), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ea554f10e7 220/417: Fix a minor typo in ts-fold-parsers.el (#14), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a7c29941c2 225/417: OCaml parser and first functions added (#21), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1d690b8d06 267/417: feat(python): Support assignment string,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 78f0b0437f 278/417: docs(README.md): Mention Noir in TODO, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c36f3ad85c 279/417: feat: Add Perl support (#66), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold be2b3dd211 275/417: feat: Add Elisp support (#63), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 323e252cf5 284/417: feat: Add Kotlin support (#70), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 8f1f182b40 307/417: perf: Speed up count matches (#88), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c4aaf00303 326/417: fix: Render it's own window, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 0d2b177527 381/417: fix: Update rust line comment rule, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold cc31fb573b 399/417: docs: Update line-reminder config, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6bb13a51ce 401/417: docs: Changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ef32910994 379/417: Update package desc, ELPA Syncer, 2024/07/01