diff --git a/emacs/.emacs.d/config/init-built-ins.el b/emacs/.emacs.d/config/init-built-ins.el index 6eba99d..3e740f6 100644 --- a/emacs/.emacs.d/config/init-built-ins.el +++ b/emacs/.emacs.d/config/init-built-ins.el @@ -53,12 +53,6 @@ :defer t :straight (:type built-in)) -(use-package hideshow - :straight (:type built-in) - :hook (prog-mode . hs-minor-mode) - :init - (general-def 'normal "zM" #'hs-hide-level)) - (use-package man :straight (:type built-in) :commands (man) diff --git a/emacs/.emacs.d/config/init-editing.el b/emacs/.emacs.d/config/init-editing.el index 88bbfb6..128bd46 100644 --- a/emacs/.emacs.d/config/init-editing.el +++ b/emacs/.emacs.d/config/init-editing.el @@ -139,4 +139,16 @@ :general (normal "gc" #'evil-operator-string-inflection)) +(use-package origami + :hook ((prog-mode . origami-mode) + (text-mode . origami-mode)) + :config + (defun origami-toggle-all-nodes-same-level (buffer point) + (interactive (list (current-buffer) (point))) + (when-let ((tree (origami-get-fold-tree buffer))) + (when-let ((path (origami-fold-find-path-containing tree point))) + (let ((parent (origami-fold-parent path))) + (dolist (fold (origami-fold-children parent)) + (origami-toggle-node buffer (origami-fold-beg fold)))))))) + (provide 'init-editing)