I am writing a package and need an ability to show some arbitrary text in place of folded code region. This text is to serve as a preview. For example:
(I obtained the second one by modifying DOM through the developer console).
As far as I know Atom’s API only allows to show ellipsis in place of a folded code region. I tried different workarounds using block/overlay decorations and direct DOM modifications from code. But these all do not play well, especially when unfolding is performed or some code around my custom foldings is folded too.
Is there any way to create such kind of foldings with preview text?