Open austinhaas opened 4 years ago
Started working on this: https://github.com/austinhaas/scrim/tree/prepl
We can either parse the EDN in elisp, or create a custom io-prepl that converts to an elisp-readable string.
Parsing the EDN output seems easy enough to do with elisp code. I just put the EDN in a temporary buffer running clojure-mode
and use the same code I use to extracts sexps in other places, and then do some minimal munging to convert the data to a plist.
https://github.com/austinhaas/scrim/blob/prepl/scrim.el#L372-L382
The main thing I'd like to fix now is setting the background colors for the output so that they span the width of the entire buffer, rather than only the strings, so that it looks like vertical slices. (And then I'd make the colors a lot more subtle.) I have no idea if that is possible, though; my searches have come up empty.
Maybe we can use an overlay. But I don't see how to insert it. Currently, we propertize the output strings in the preoutput-filter.
Not sure how easy this is to implement, because we might have to parse EDN in elisp.
Might make it easy to colorize the output by type.