[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold ee0c0eb252 312/417: fix(make): Folding recipe
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold ee0c0eb252 312/417: fix(make): Folding recipe |
Date: |
Mon, 1 Jul 2024 10:02:55 -0400 (EDT) |
branch: elpa/treesit-fold
commit ee0c0eb25266308a795c741c6ef177149339f17c
Author: JenChieh <jcs090218@gmail.com>
Commit: JenChieh <jcs090218@gmail.com>
fix(make): Folding recipe
---
ts-fold-parsers.el | 3 ++-
ts-fold.el | 10 ++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index 0b3193c472..0d9aaf5d68 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -61,6 +61,7 @@
(declare-function ts-fold-range-lua-else "ts-fold.el")
(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-make-recipe "ts-fold.el")
(declare-function ts-fold-range-ocaml "ts-fold.el")
(declare-function ts-fold-range-clojure-function "ts-fold.el")
(declare-function ts-fold-range-pascal-comment "ts-fold.el")
@@ -317,7 +318,7 @@
(defun ts-fold-parsers-make ()
"Rule set for Make."
- '((recipe . (ts-fold-range-seq -1 -1))
+ '((recipe . ts-fold-range-make-recipe)
(comment
. (lambda (node offset)
(ts-fold-range-line-comment node offset "#")))))
diff --git a/ts-fold.el b/ts-fold.el
index ad9b61eeff..1d78435cea 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -822,6 +822,16 @@ more information."
(setq end (ts-fold--last-eol end)))
(ts-fold--cons-add (cons beg end) offset)))
+(defun ts-fold-range-make-recipe (node offset)
+ "Define fold range for `recipe' in Make.
+
+For arguments NODE and OFFSET, see function `ts-fold-range-seq' for
+more information."
+ (when-let* ((last-child (ts-fold-last-child node))
+ (beg (tsc-node-start-position node))
+ (end (tsc-node-end-position last-child)))
+ (ts-fold--cons-add (cons beg end) offset)))
+
;;+ OCaml
(defun ts-fold-range-ocaml-comment (node offset)
- [nongnu] elpa/treesit-fold 0c13c0e4ed 374/417: ci: Bump Emacs 29.x to 3, (continued)
- [nongnu] elpa/treesit-fold 0c13c0e4ed 374/417: ci: Bump Emacs 29.x to 3, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold e015c9a3eb 297/417: feat: Add Jsonnet support (#81), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d50f5dd2f8 398/417: feat(parser): Add token_tree to Rust, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6dda55a29a 298/417: doc: Add development languages, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ac1461d364 338/417: feat: Add LLVM support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9f82f1e632 400/417: Support for treesit.el (#3), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1d8d9352a1 369/417: feat: Add Svelte support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c0e9bb7f3e 344/417: fix: Improve Julia rules, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9f48ef560c 322/417: fix: render all frames, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 12ae1d0457 356/417: Added section & environment folding to latex-parser, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ee0c0eb252 312/417: fix(make): Folding recipe,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 57c1bb8e0a 317/417: feat: Add Arduino support (#95), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 15811f4465 386/417: fix: on fold hook in recursive open, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9945282f03 349/417: Added a matlab parser for folding., ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a549e4050c 367/417: chore: Test 29.2, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c6014608c7 365/417: fix(parser): Support Assembly's block comment, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6a57bd945d 364/417: fix(cmake): Enhance body folding, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 0fa1378c9b 407/417: Remove dependency in `fringe-helper.el` (#7), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7c8e1a5467 406/417: fix: In case the AST doesn't get refreshed, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold e2d4cb9fac 411/417: docs: Add Gleam to supported list, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold af3a57b656 413/417: docs: Changelog bump, ELPA Syncer, 2024/07/01