mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Use ellipsis icon for folded text
This commit is contained in:
@ -189,14 +189,17 @@
|
|||||||
(setq hs-set-up-overlay
|
(setq hs-set-up-overlay
|
||||||
(lambda (ov)
|
(lambda (ov)
|
||||||
(when (eq 'code (overlay-get ov 'hs))
|
(when (eq 'code (overlay-get ov 'hs))
|
||||||
(let ((marker-string "*")
|
(let* ((marker-string "*")
|
||||||
(display-string (format " ... " (count-lines (overlay-start ov)
|
(display-string (concat " " (all-the-icons-octicon "ellipsis" :v-adjust 0) " "))
|
||||||
(overlay-end ov)))))
|
(len (length display-string)))
|
||||||
(put-text-property 0 1 'display
|
(put-text-property 0 1 'display
|
||||||
(list 'right-fringe 'hs-marker 'hs-fringe-face)
|
(list 'right-fringe 'hs-marker 'hs-fringe-face)
|
||||||
marker-string)
|
marker-string)
|
||||||
(put-text-property 0 (length display-string)
|
(put-text-property 0 1 'face 'hs-face display-string)
|
||||||
'face 'hs-face display-string)
|
(put-text-property (1- len) len 'face 'hs-face display-string)
|
||||||
|
(put-text-property 1 (1- len)
|
||||||
|
'face `(:inherit hs-face :family ,(all-the-icons-octicon-family) :height 1.2)
|
||||||
|
display-string)
|
||||||
(overlay-put ov 'before-string marker-string)
|
(overlay-put ov 'before-string marker-string)
|
||||||
(overlay-put ov 'display display-string))))))
|
(overlay-put ov 'display display-string))))))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user