Files
.emacs.d/modules/editor/siren-hideshow.el
Jim Myhrberg 7c253d986c feat(editor): improve code folding with origami
Add and configure origami, and enable it for majro modes where it seems
to do a good job, and keep using hideshow for other major modes.
2022-07-20 22:02:12 +01:00

28 lines
641 B
EmacsLisp

;;; siren-hideshow.el --- jimeh's Emacs Siren: folding configuration.
;;; Commentary:
;; Basic configuration for hideshow code.
;;; Code:
(use-package hideshow
:straight (:type built-in)
:general
(:keymaps 'hs-minor-mode-map
"C-=" 'siren-hideshow-toggle
"C-c C-h" 'siren-hideshow-toggle)
:preface
(defun siren-hideshow-toggle (column)
"Toggle hiding/showing blocks via hs-mode.
Borrowed from: http://www.emacswiki.org/emacs/HideShow"
(interactive "P")
(condition-case nil
(hs-toggle-hiding)
(error (hs-show-all)))))
(provide 'siren-hideshow)
;;; siren-hideshow.el ends here