[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 27c0fd0c7e 361/417: style: Place functions in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 27c0fd0c7e 361/417: style: Place functions in alphabetic order |
Date: |
Mon, 1 Jul 2024 10:03:04 -0400 (EDT) |
branch: elpa/treesit-fold
commit 27c0fd0c7ef6435ffb48242810601157cab57d45
Author: JenChieh <jcs090218@gmail.com>
Commit: JenChieh <jcs090218@gmail.com>
style: Place functions in alphabetic order
---
ts-fold-parsers.el | 12 ------------
ts-fold.el | 42 +++++++++++++++++++++---------------------
2 files changed, 21 insertions(+), 33 deletions(-)
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index 269b05a1d9..254ce720e0 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -508,18 +508,6 @@
. (lambda (node offset)
(ts-fold-range-line-comment node offset "#")))))
-(defun ts-fold-parsers-matlab ()
- "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)))
-
(defun ts-fold-parsers-qss ()
"Rule set for QSS."
(append (ts-fold-parsers-css)))
diff --git a/ts-fold.el b/ts-fold.el
index ce3a2b0b16..54cc130dd2 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -831,6 +831,27 @@ information."
(end (1- (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.
+
+For arguments NODE and OFFSET, see function `ts-fold-range-seq' for
+more information."
+ (when-let* ((beg-node (tsc-get-child-by-field node :begin))
+ (end-node (tsc-get-child-by-field node :end))
+ (beg (tsc-node-end-position beg-node))
+ (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-lisp-function (node offset)
"Define fold range for function in Lisp .
@@ -1154,27 +1175,6 @@ more information."
(end (tsc-node-end-position node)))
(ts-fold--cons-add (cons (+ beg 3) (- end 3)) offset)))
-(defun ts-fold-range-latex-environment (node offset)
- "Define fold range for latex environments.
-
-For arguments NODE and OFFSET, see function `ts-fold-range-seq' for
-more information."
- (when-let* ((beg-node (tsc-get-child-by-field node :begin))
- (end-node (tsc-get-child-by-field node :end))
- (beg (tsc-node-end-position beg-node))
- (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 85db0117ea 240/417: tests: Avoid actions' warnings, (continued)
- [nongnu] elpa/treesit-fold 85db0117ea 240/417: tests: Avoid actions' warnings, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a64f5252a6 244/417: Add .dir-locals.el (#40), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9776e2fa2c 247/417: Update copyright year, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 56e6743bac 252/417: feat: Improve folding for C preproc operators (#46), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9d9e0c5cf7 257/417: Add more folding definitions (#51), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 54d12c9822 281/417: feat: Add TOML support (#68), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold b1021c2acb 293/417: feat: Add Noir support (#77), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold fe3e7610b1 403/417: fix: `treesit-fold-close-all` raises an wrong type error (#5), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 993db0aa02 383/417: feat: Enhance SQL folding, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 0b48d9b286 355/417: reordered the alists for alphabetical ordering, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 27c0fd0c7e 361/417: style: Place functions in alphabetic order,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold e36498c9e1 323/417: docs: Apply new changes from line-reminder, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a6c75c8373 334/417: Bump version, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold e704add10d 340/417: fix(llvm): Fix folding for LLVM's label, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 41c13ff0e2 416/417: 2 bug fix (#10), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold eb714e2c21 408/417: feat: Add Gleam support (#8), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 14e3f13f67 415/417: feat: Enhance the Gleam support (#9), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7833eb31ab 096/417: Function void, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ad0e036355 099/417: Core, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 862b571191 118/417: Remove def, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 44714c252a 126/417: Quote description, ELPA Syncer, 2024/07/01