feat(fold): add +fold-ellipsis var
Bring *some* consistency to the text display when text is ellided/folded. Close: #7743 Co-authored-by: seanfarley <seanfarley@users.noreply.github.com>
This commit is contained in:
parent
6077b6f0d8
commit
9a6bcc31f9
2 changed files with 22 additions and 3 deletions
|
@ -30,7 +30,8 @@
|
|||
'empty-line
|
||||
'vimish-fold-fringe))))
|
||||
(overlay-put
|
||||
ov 'display (propertize " [...] " 'face '+fold-hideshow-folded-face))))
|
||||
ov 'display (propertize +fold-ellipsis
|
||||
'face '+fold-hideshow-folded-face))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
;;; editor/fold/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defcustom +fold-ellipsis " [...] "
|
||||
"The ellipsis to show for ellided regions (folds).
|
||||
|
||||
`org-ellipsis', `truncate-string-ellipsis', and `ts-fold-replacement' are set to
|
||||
this."
|
||||
:type 'string
|
||||
:group '+fold)
|
||||
|
||||
|
||||
;;
|
||||
;;; Global config
|
||||
|
||||
(when (modulep! :editor evil)
|
||||
;; Add vimish-fold, outline-mode & hideshow support to folding commands
|
||||
(define-key! 'global
|
||||
|
@ -18,9 +30,15 @@
|
|||
"zd" #'vimish-fold-delete
|
||||
"zE" #'vimish-fold-delete-all)))
|
||||
|
||||
(after! org
|
||||
(setq org-ellipsis +fold-ellipsis))
|
||||
|
||||
(after! mule-util
|
||||
(setq truncate-string-ellipsis +fold-ellipsis))
|
||||
|
||||
|
||||
;;
|
||||
;; Packages
|
||||
;;; Packages
|
||||
|
||||
(use-package! hideshow ; built-in
|
||||
:commands (hs-toggle-hiding
|
||||
|
@ -97,5 +115,5 @@
|
|||
:box nil
|
||||
:inherit font-lock-comment-face
|
||||
:weight light))
|
||||
(setq ts-fold-replacement " [...] ")
|
||||
(setq ts-fold-replacement +fold-ellipsis)
|
||||
(global-ts-fold-mode +1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue