feature/evil: refactor folding & outline support
Code folding commands will now obey outline headers (if outline-minor-mode is on and in outline-mode).
This commit is contained in:
parent
9245e030bb
commit
6fce87bd06
4 changed files with 108 additions and 59 deletions
|
@ -5,6 +5,12 @@
|
|||
"Face to hightlight `hideshow' overlays."
|
||||
:group 'doom-themes)
|
||||
|
||||
;;;###autoload
|
||||
(defun +hideshow*ensure-mode (&rest _)
|
||||
"Ensure hs-minor-mode is enabled."
|
||||
(unless (bound-and-true-p hs-minor-mode)
|
||||
(hs-minor-mode +1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +hideshow-haml-forward-sexp (arg)
|
||||
(haml-forward-sexp arg)
|
||||
|
|
|
@ -25,7 +25,14 @@
|
|||
enh-ruby-forward-sexp nil)
|
||||
(matlab-mode "if\\|switch\\|case\\|otherwise\\|while\\|for\\|try\\|catch"
|
||||
"end"
|
||||
nil (lambda (arg) (matlab-forward-sexp))))
|
||||
nil (lambda (_arg) (matlab-forward-sexp))))
|
||||
hs-special-modes-alist
|
||||
'((t))))))
|
||||
|
||||
|
||||
;; Ensure `hs-minor-mode' is active when triggering these commands
|
||||
(advice-add #'hs-toggle-hiding :before #'+hideshow*ensure-mode)
|
||||
(advice-add #'hs-hide-block :before #'+hideshow*ensure-mode)
|
||||
(advice-add #'hs-hide-level :before #'+hideshow*ensure-mode)
|
||||
(advice-add #'hs-show-all :before #'+hideshow*ensure-mode)
|
||||
(advice-add #'hs-hide-all :before #'+hideshow*ensure-mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue