Switch to origami instead of hideshow
This commit is contained in:
parent
b80b256786
commit
3f7dc1c744
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user