File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,6 @@ turn off `treesit-fold-mode`
475
475
with this plugin.
476
476
477
477
` ` ` elisp
478
-
479
478
(setq treesit-fold-indicators-face-function
480
479
(lambda (pos & rest _)
481
480
;; Return the face of it' s function.
@@ -489,6 +488,11 @@ turn off `treesit-fold-mode`
489
488
(advice-add ' line-reminder-transfer-to-saved-lines :after
490
489
;; Refresh indicators for package ` treesit-fold' .
491
490
#' treesit-fold-indicators-refresh)
491
+
492
+ (add-hook ' treesit-fold-indicators-refresh-hook
493
+ (lambda (&rest _)
494
+ (line-reminder--render-buffer)
495
+ (line-reminder--thumb-render-buffer)))
492
496
```
493
497
494
498
### 📝 Summary
Original file line number Diff line number Diff line change 58
58
(const :tag " Inaccurate rendering but fast" partial))
59
59
:group 'treesit-fold )
60
60
61
+ (defcustom treesit-fold-indicators-refresh-hook nil
62
+ " Hook run after indicators refresh."
63
+ :type 'hook
64
+ :group 'treesit-fold )
65
+
61
66
(fringe-helper-define 'treesit-fold-indicators-fr-plus nil
62
67
" XXXXXXX"
63
68
" X.....X"
@@ -362,7 +367,8 @@ Optional arguments WEND and WSTART are the range for caching."
362
367
(treesit-fold-indicators--remove-ovs)
363
368
(thread-last nodes-to-fold
364
369
(mapcar #'cdr )
365
- (mapc #'treesit-fold-indicators--create ))))))
370
+ (mapc #'treesit-fold-indicators--create ))
371
+ (run-hooks 'treesit-fold-indicators-refresh-hook )))))
366
372
367
373
(defun treesit-fold-indicators--remove-ovs (&optional window )
368
374
" Remove all indicators overlays in this WINDOW."
You can’t perform that action at this time.
0 commit comments