Move hideshow config from ui/doom->emacs/hideshow

This commit is contained in:
Henrik Lissner 2018-08-03 18:20:27 +02:00
parent 0c36b4450e
commit 417736ecf6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 22 additions and 21 deletions

View file

@ -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

View file

@ -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