This will be a quick post. Indeed, probably I’ll do a lot of quick posts on the following days. The reason is this one:

I’ll probably not be able to keep up with “one post per day”, but I’ll aim for two per week. Maybe it’ll work. Maybe not. But lets see.

Now, for the subject: some time ago, I’ve ported Chlorine to VSCode. REPL-Tooling changed a lot since then, got more features, and now I want to revisit that plug-in and upgrade it.

The first thing I did on that version was to remove the “submodule dependency”. So now, REPL-Tooling is really a library being consumed by VSCode. This got me some problems because the way I need to develop it: there are some key differences between Code and Atom, but the most significant is that Code doesn’t allow you to change the UI in any way. So, we need a webview, but the way you communicate between the “plug-in” and the “webview” is by passing messages. This poses a problem because, on REPL-Tooling, when you evaluate something it returns the result already parsed. I could change Chlorine and REPL-Tooling to not parse anything, but by pure luck every evaluation already returned two fields: :result and :as-text (that I intended to use for other things, and became just “noise”). I just adjusted :as-text to be the “unparsed” version, and then sent it to the webview, and its done.

Now, there are LOTS of things on Chlorine that still are not present on Clover: Goto definition is really crude, Autocomplete doesn’t detect some vars (probably not fixable – Microsoft really put lots of restrictions on some functionalities), Custom commands aren’t present (again, I’m not sure how could I implement this, because again of Microsoft restrictions), Documentation doesn’t exist for now (it’s still not ported from Chlorine to REPL-Tooling), and none of the REBL integration is still done.

But it works, connects to Clojure, Lumo, Plank, Babashka, Joker, ClojureCLR and Arcadia, and why not say, it is a fun project :).