Draft: Replace Babashka with Lua + Sidecar library #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an experiment to replace Babashka with more Lua (and some Rust)
I initially implemented stuff in Babashka because you can't do a lot of stuff in Neovims lua and this seemed like a great idea, however this kinda got me into implementing most logic in Clojure because I wanted to limit how much calling between both worlds we do with the custom RPC stuff.
This however has some disadvantages, one is in order to ship this with only Babashka I can't use dependencies because while Babashka ships with a ton if you need anything else the user has to have a JDK available which I don't like also maybe Clojure isn't something most Neovim and Defold users are familar with so this might make this plugin less approachable. While this is also true for Rust to a somewhat lesser degree (I think) the new approach I am playing around with here is to only move what we can't do with Neovim Lua by default to the sidecar and everything else should stay in Lua, e.g. Neovim Lua doesn't have a HTTP client so we do the editor command API via Rust. The goal being to completely remove any dependencies outside Neovim and the sidecar itself
Things to port
Other tasks