[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold dd36cd388a 360/417: Untabified, reorganized a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold dd36cd388a 360/417: Untabified, reorganized alphabetically: parsers |
Date: |
Mon, 1 Jul 2024 10:03:04 -0400 (EDT) |
branch: elpa/treesit-fold
commit dd36cd388ac46fc28371b47931f0391ed473a84f
Author: Nidish Narayanaa Balaji <nidbid@gmail.com>
Commit: Jen-Chieh Shen <jcs090218@gmail.com>
Untabified, reorganized alphabetically: parsers
---
ts-fold-parsers.el | 22 +++++++++++-----------
ts-fold-summary.el | 8 ++++----
ts-fold.el | 52 ++++++++++++++++++++++++++--------------------------
3 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index de09bc8920..269b05a1d9 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -363,10 +363,10 @@
"Rule set for LaTex."
'((generic_environment . ts-fold-range-latex-environment)
(math_environment . ts-fold-range-latex-environment)
- (section . ts-fold-range-latex-section)
- (subsection . ts-fold-range-latex-section)
- (subsubsection . ts-fold-range-latex-section)
- (curly_group . ts-fold-range-seq)
+ (section . ts-fold-range-latex-section)
+ (subsection . ts-fold-range-latex-section)
+ (subsubsection . ts-fold-range-latex-section)
+ (curly_group . ts-fold-range-seq)
(line_comment
. (lambda (node offset)
(ts-fold-range-line-comment node offset "%")))))
@@ -512,13 +512,13 @@
"Rule set for MATLAB."
'((expression_list . ts-fold-range-seq)
(function_definition . ts-fold-range-matlab-function)
- (class_definition . ts-fold-range-matlab-function)
- (if_statement . ts-fold-range-matlab-statements)
- (for_statement . ts-fold-range-matlab-statements)
- (while_statement . ts-fold-range-matlab-statements)
- (switch_statement . ts-fold-range-matlab-statements)
- (try_statement . ts-fold-range-matlab-statements)
- (comment . ts-fold-range-matlab-blocks)))
+ (class_definition . ts-fold-range-matlab-function)
+ (if_statement . ts-fold-range-matlab-statements)
+ (for_statement . ts-fold-range-matlab-statements)
+ (while_statement . ts-fold-range-matlab-statements)
+ (switch_statement . ts-fold-range-matlab-statements)
+ (try_statement . ts-fold-range-matlab-statements)
+ (comment . ts-fold-range-matlab-blocks)))
(defun ts-fold-parsers-qss ()
"Rule set for QSS."
diff --git a/ts-fold-summary.el b/ts-fold-summary.el
index 636deedbc7..dcf4a9fcfa 100644
--- a/ts-fold-summary.el
+++ b/ts-fold-summary.el
@@ -138,10 +138,6 @@ type of content by checking the word boundary's existence."
"Extract summary from DOC-STR in Python."
(ts-fold-summary--generic doc-str "\"\"\""))
-(defun ts-fold-summary-matlab-doc (doc-str)
- "Extract summary from MATLAB DOC-STR."
- (ts-fold-summary--generic doc-str "%"))
-
(defun ts-fold-summary-rst-doc (doc-str)
"Extract summary from DOC-STR in reStructuredText."
(ts-fold-summary--generic doc-str ".."))
@@ -174,6 +170,10 @@ type of content by checking the word boundary's existence."
"Extract summary from DOC-STR in Markdown block."
(ts-fold-summary--doc-extract doc-str '("-" "```")))
+(defun ts-fold-summary-matlab-doc (doc-str)
+ "Extract summary from MATLAB DOC-STR."
+ (ts-fold-summary--generic doc-str "%"))
+
(defun ts-fold-summary-mermaid (doc-str)
"Extract summary from DOC-STR in Mermaid comment."
(ts-fold-summary--generic doc-str '("%%")))
diff --git a/ts-fold.el b/ts-fold.el
index 3e19cc4b8d..ce3a2b0b16 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -977,6 +977,22 @@ more information."
(end (tsc-node-end-position last-child)))
(ts-fold--cons-add (cons beg end) offset)))
+(defun ts-fold-range-matlab-blocks (node offset)
+ "Define fold range for MATLAB blocks.
+
+Each block is delimited by a line starting with '%%'.
+For arguments NODE and OFFSET, see function `ts-fold-range-line-comment' for
+more information."
+ (when (string-prefix-p "%%" (tsc-node-text node))
+ (let* ((beg (tsc-node-end-position node))
+ (end (or (save-excursion
+ (progn (goto-char beg)
+ (when (re-search-forward "^\s*\^L%%" nil t)
+ (forward-line -1) (end-of-line)
+ (point))))
+ (tsc-node-end-position (tsc-get-parent node)))))
+ (ts-fold--cons-add (cons beg end) offset))))
+
(defun ts-fold-range-matlab-function (node offset)
"Define fold range for MATLAB function definitions.
@@ -1009,22 +1025,6 @@ more information."
(end (tsc-node-start-position (car (ts-fold-find-children node
"end")))))
(ts-fold--cons-add (cons beg end) offset)))
-(defun ts-fold-range-matlab-blocks (node offset)
- "Define fold range for MATLAB blocks.
-
-Each block is delimited by a line starting with '%%'.
-For arguments NODE and OFFSET, see function `ts-fold-range-line-comment' for
-more information."
- (when (string-prefix-p "%%" (tsc-node-text node))
- (let* ((beg (tsc-node-end-position node))
- (end (or (save-excursion
- (progn (goto-char beg)
- (when (re-search-forward "^\s*\^L%%" nil t)
- (forward-line -1) (end-of-line)
- (point))))
- (tsc-node-end-position (tsc-get-parent node)))))
- (ts-fold--cons-add (cons beg end) offset))))
-
(defun ts-fold-range-mermaid-diagram (node offset)
"Define fold range for any diagram in Mermaid.
@@ -1154,16 +1154,6 @@ more information."
(end (tsc-node-end-position node)))
(ts-fold--cons-add (cons (+ beg 3) (- end 3)) offset)))
-(defun ts-fold-range-latex-section (node offset)
- "Define fold range for latex section.
-
-For arguments NODE and OFFSET, see function `ts-fold-range-seq' for
-more information."
- (when-let* ((lab-node (car (ts-fold-find-children node "curly_group")))
- (beg (tsc-node-end-position lab-node))
- (end (tsc-node-end-position node)))
- (ts-fold--cons-add (cons beg end) offset)))
-
(defun ts-fold-range-latex-environment (node offset)
"Define fold range for latex environments.
@@ -1175,6 +1165,16 @@ more information."
(end (tsc-node-start-position end-node)))
(ts-fold--cons-add (cons beg end) offset)))
+(defun ts-fold-range-latex-section (node offset)
+ "Define fold range for latex section.
+
+For arguments NODE and OFFSET, see function `ts-fold-range-seq' for
+more information."
+ (when-let* ((lab-node (car (ts-fold-find-children node "curly_group")))
+ (beg (tsc-node-end-position lab-node))
+ (end (tsc-node-end-position node)))
+ (ts-fold--cons-add (cons beg end) offset)))
+
(defun ts-fold-range-rst-body (node offset)
"Define fold range for `body' in reStructuredText.
- [nongnu] elpa/treesit-fold dcf6fdcb85 292/417: Bump version for next version, (continued)
- [nongnu] elpa/treesit-fold dcf6fdcb85 292/417: Bump version for next version, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold b52b33357e 300/417: feat: Add Erlang support (#83), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold cd7963038f 318/417: feat: Add Fish support (#96), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 8972eb674e 391/417: feat: Fully support isearch and modification conditions (#1), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 3dd7c477fb 305/417: feat: Add CMake support (#86), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 250567abd2 345/417: Register qss-mode with CSS, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 648f75ef06 342/417: fix(indicators): Add option for rendering method, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold db35c17409 331/417: lint, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c70ac04ea5 358/417: Fixed linting warnings, untabified, tested locally with eask., ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 4ef65016fd 396/417: fix: Respect same line folding from close all, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold dd36cd388a 360/417: Untabified, reorganized alphabetically: parsers,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 4e9492c2f8 370/417: fix changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 714d645b68 337/417: fix: error Invalid face box quote (:line-width -1 :style 'pressed-button), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c8638d41be 372/417: feat(Zig): Add more Zig folding rules, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c45985d720 330/417: fix: Remove unused function, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 45f20588f0 304/417: docs(README.md): Add development languages, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 206d849f72 012/417: add support for nix, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 13941aa169 016/417: Add support for Go structs, interfaces, methods and functions, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 665dd1e46d 017/417: Merge pull request #1 from jakejx/go-support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 2b10944ca4 027/417: Remove old readme, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a3b5c852ac 044/417: WIP js support, ELPA Syncer, 2024/07/01