Move hideshow config from ui/doom->emacs/hideshow
This commit is contained in:
parent
0c36b4450e
commit
417736ecf6
3 changed files with 22 additions and 21 deletions
|
@ -1,5 +1,10 @@
|
|||
;;; emacs/hideshow/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defface +hideshow-folded-face
|
||||
`((t (:inherit font-lock-comment-face :weight light)))
|
||||
"Face to hightlight `hideshow' overlays."
|
||||
:group 'doom-themes)
|
||||
|
||||
;;;###autoload
|
||||
(defun +hideshow-haml-forward-sexp (arg)
|
||||
(haml-forward-sexp arg)
|
||||
|
@ -14,6 +19,19 @@
|
|||
(goto-char (cadr range))
|
||||
(end-of-line)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +hideshow-set-up-overlay (ov)
|
||||
(when (eq 'code (overlay-get ov 'hs))
|
||||
(when (featurep 'vimish-fold)
|
||||
(overlay-put
|
||||
ov 'before-string
|
||||
(propertize "…" 'display
|
||||
(list vimish-fold-indication-mode
|
||||
'empty-line
|
||||
'vimish-fold-fringe))))
|
||||
(overlay-put
|
||||
ov 'display (propertize " [...] " 'face '+hideshow-folded-face))))
|
||||
|
||||
|
||||
;;
|
||||
;; Indentation detection
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
;;; emacs/hideshow/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! hideshow ; built-in
|
||||
(setq hs-hide-comments-when-hiding-all nil)
|
||||
(setq hs-hide-comments-when-hiding-all nil
|
||||
;; Nicer code-folding overlays (with fringe indicators)
|
||||
hs-set-up-overlay #'+hideshow-set-up-overlay)
|
||||
|
||||
;; extra folding support for more languages
|
||||
(unless (assq 't hs-special-modes-alist)
|
||||
(setq hs-special-modes-alist
|
||||
(append
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue