coming with tree-sitter support, but it was limited, basing on my experience porting ts-fold to tre…
انتشار: 2026/06/19 23:07 UTC
coming with tree-sitter support, but it was limited, basing on my experience porting ts-fold to treesit.el (what became treesit-fold.el), i added a few things to allow major modes to decide how to configure it.It works out-the-box for the built-in tree-sitter modes (well, most of them), for third-party, the package maintainers must configure hideshow manually. Visual IndicatorsNot many folding packages add support for indicators (the only one maybe was ts/treesit-fold), this is useful to know what can actually be folded, for hideshow there is hideshowvis, I used it with hideshow, but it was buggy. The disappointment I had when I learned that the creator rejected the offer to move it to GNU ELPA (and thus to core), motivated me to implement this, unlike hideshowvis, the built-in supports 3 types of indicators: fringes, margins, and EOL; and work both for TUI and GUI. Display how many lines are foldedAlso inspired by hideshowvis and treesit-fold, this allows to see how many lines are hidden in a block, nothing more.preview.redd.it/n7v7hfyvbb8h1.png?width=2… Easily change the prefix keymapIt's well-know hideshow have a hard prefix key "C-c @", i've changed how this prefix is defined so, if you want to change it to another key prefix you can just do: :bind (:map hs-minor-mode-map ("C-c @" . nil) ("M-h" . hs-prefix-map)) TAB cycling foldingThis was not added by me, but by Juri Linkov, this is a port of outline-minor-mode-cycle, allows to use the TAB key to toggle the folding depending of the context (e.g. If you are at the BOL or EOL or everywhere on the headline, etc...).Most heavy stuff for hideshow were done, and i intend to still making it more extensible, for example, support multiple folding systems at the same time.So that's, i invite people to use and experiment with the current hideshow.el version in this emacs-31redd.it/1uafbsn@r_emacs