tsx-mode.el
tsx-mode.el copied to clipboard
Origami regions for things other than CSS-in-JS
Origami is great since it lets you fold large sections of code such as function bodies or classes. The default behaviour of tsx-mode
is to set origami regions exclusively to CSS-in-JS regions, so these can be folded. This is great, but thoroughly counterproductive for anyone that wishes to use origami for folding actual blocks of code. With this issue I'd like to request that origami regions are created not just for CSS-in-JS, but can also be created, configurably, for any tree-sitter node. Curly brace blocks, for example, should be included as default behaviour, as it is for other C-like languages.
ah, yes, that makes sense. I don't use code-folding outside of CSS-in-JS and so didn't think of this use case, but you're right. this shouldn't be too hard to fix.
that wasn't too bad. have a look at the 28/origami
branch and see if that addresses your concerns.
fixed by #29 .