Patrefans
onivim from patreon
onivim patreon

Update (Oni v2)

🕑 Added 2018-12-01 17:52:19 +0000 UTC

Comments

Hey Stefan! Great question, as it's something I'm still thinking through (so maybe you or others might have feedback). One of the motivating factors for pursuing a new architecture was some functionality we exposed via plugins was hard to get right performance wise - like the 'Buffer Layers' - the ability to render UI dynamically on top of the editor would be pretty janky with scrolling. VSCode 'fixes' this by limiting their extension model. However, I think we can do better: - One option is to allow JavaScript extension to still use the Oni API (which allows more customization). This could be specified by the 'engine' property in the plugins package json - whether it works against VSCode's API or Oni's API. The performance might be better, because it would never block rendering, but it would still be hard to get real-time performance for things like rendering, because of the interop between the reason JS/node process hosting the plugin - so the 'jank' for plugins that need to render real-time would still be unsolved in this approach. - Another option is to allow for _native code plugins_ - essentially DLLs that could be written in Reason/OCaml to directly extend the editor process natively. I think this is an exciting direction, but there are a few concerns - like how do you protect against malicious native plugins? But it's an avenue I'd like to pursue further. Let me know if you have any thoughts.

A lot of good ideas! I had a look at Reason and I find it amazing, but (back at that time) the available BuckleScript binding with existing JS packages wasn't enough to try it in more depth. I have one fear with the "VSCode's extension host" idea: Would this limit "Oni extensions" to only the API VSCode has? Because with modal editing and neovims (not finished) grid support, I guess, the VSCode API wouldn't be enough to use all features of Oni as a plugin author.

Thanks Christopher! Will keep you posted. I'll be putting a repo up in the next week or so, but won't be usable to start (focusing on the test infra / validating extension host + neovim integration). I'll definitely post another update when it is in a usable state. I think it makes a lot of sense to reuse the great work the VSCode team is doing + the excellent ecosystem of language integration, as opposed to trying to reinvent the wheel like in Oni v1.

Awesome! Especially full integration with VSCode Plugins! As soon as you have something to test, I am on it!


More Creators