Fork me on GitHub
#emacs
<
2022-02-09
>
robert-stuttaford12:02:46

Exhibit A: a typical piece of code from a .cljc file in our codebase. When I use emacs' hide-show-mode (via 'hs-minor-mode hook), I'd love to be able to tell it to expand one level deeper to unwrap the #?(:clj ) directive. Does anyone have some idea how to do this? 😬

pavlosmelissinos12:02:26

Something like this? M-x hs-toggle-hiding will get you from one state to the other

vemv12:02:05

Here's some code that toggles hs stuff according to custom regexes (in my case, ns forms), might serve of inspiration https://github.com/zenmacs/.emacs.d/blob/86732106270d7f01599d2d0fe50e0e13cbea0ef0/lib/non-submodules/vemv.clojure-interaction.el#L57-L66

robert-stuttaford14:02:17

@UEQPKG7HQ right, i have a bind that applies that toggle to all the forms at the same time, folding it like you see there. i want it to fold from one level down for the :clj forms, without me having to manually key there and toggle it

robert-stuttaford14:02:27

thanks @U45T93RA6 i'll check it out!