[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 1bc43aa561 254/417: updated line-reminder com
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 1bc43aa561 254/417: updated line-reminder compatibility in README (#50) |
Date: |
Mon, 1 Jul 2024 10:02:32 -0400 (EDT) |
branch: elpa/treesit-fold
commit 1bc43aa56140bccdc5ee8435aa388c9a6f0d46d5
Author: Hank Greenburg <ragreenburg@gmail.com>
Commit: GitHub <noreply@github.com>
updated line-reminder compatibility in README (#50)
---
README.md | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 1f39e665b3..54e54f630b 100644
--- a/README.md
+++ b/README.md
@@ -460,13 +460,28 @@ turn off `ts-fold-mode`
with this plugin.
```elisp
- (setq ts-fold-indicators-face-function
- (lambda (pos &rest _)
- (let ((ln (line-number-at-pos pos)))
- (cond
- ((memq ln line-reminder--change-lines)
'line-reminder-modified-sign-face)
- ((memq ln line-reminder--saved-lines) 'line-reminder-saved-sign-face)
- (t nil)))))
+(defmacro fold-line-reminder (symbols where &rest body)
+ "Global advice-add utility."
+ (declare (indent 2))
+ `(cond ((listp ,symbols)
+ (dolist (symbol ,symbols)
+ (advice-add symbol ,where (lambda (&optional arg0 &rest args)
,@body))))
+ (t (advice-add ,symbols ,where (lambda (&optional arg0 &rest args)
,@body)))))
+
+(use-package ts-fold
+ :hook (tree-sitter-after-on . ts-fold-line-comment-mode)
+ :hook (tree-sitter-after-on . ts-fold-indicators-mode)
+ :init
+ (setq ts-fold-indicators-fringe 'left-fringe
+ ts-fold-indicators-face-function
+ (lambda (pos &rest _)
+ ;; Return the face of it's function.
+ (line-reminder--get-face (line-number-at-pos pos t))))
+ :config
+ (require 'line-reminder)
+ (fold-line-reminder 'line-reminder-transfer-to-saved-lines :after
+ ;; Refresh indicators for package `ts-fold'.
+ (ts-fold-indicators-refresh)))
```
### 📝 Summary
- [nongnu] elpa/treesit-fold c6014608c7 365/417: fix(parser): Support Assembly's block comment, (continued)
- [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
- [nongnu] elpa/treesit-fold 75d6f9ed31 253/417: Add extra folding definitions for golang (#42), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d2f88cbf1b 123/417: Add parser, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1b54cdc9fc 139/417: Update doc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 3d1be710a6 200/417: Update README.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1bc43aa561 254/417: updated line-reminder compatibility in README (#50),
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 27c6bc4819 265/417: feature(parser): Add support for python docstring (#58), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 663dcac0a9 301/417: chore(deps): bump actions/checkout from 3 to 4 (#84), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 704a0463ed 357/417: fixed merge conflict, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 46fdb65c77 395/417: feat: Add hook after indicator refresh, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a39f3bbe48 117/417: WIP for C preprocessor, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold af2679860f 129/417: Def prog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold e334470a17 203/417: update, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7667a37644 268/417: fix(indicators): Warning 'when' with empty body, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold b19f6f54bf 371/417: feat: Add Haxe support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold de6d9ae174 255/417: docs(README.md): Improve instruction for line-reminder, ELPA Syncer, 2024/07/01