Fork me on GitHub
#emacs
<
2022-10-09
>
witek20:10:31

[Code Folding] I would like to fold (defn ...) blocks. I have tried origami, but it also folds all nested forms inside my top level defn. Any suggestions how I can setup a folding of only the top level forms?

elken20:10:59

hideshow should be able to do what you want. Check the https://www.gnu.org/software/emacs/manual/html_node/emacs/Hideshow.html and customize hs-special-modes-alist as needed. Tree-sitter should also be able to handle this, but it's spotty support wise atm, can't comment on how good Clojure's is.

👍 2