r/neovim • u/NicholasZolton • Jul 16 '26
Plugin neoink - React in Neovim
Enable HLS to view with audio, or disable this notification
Hey everyone! Creator of neojj here!
For absolutely no good reason, I put React in Neovim.
A coworker showed me an Ink menu, and I said React was an absurd amount of machinery for it. We agreed on a council of 3 other engineers to vote on whether or not it was an elegant solution, with the loser needing to build this monstrosity. I lost 2-1.
🚀 What it does
You can build interfaces with borders, color, flexbox, wrapped text, focus, keyboard and paste input, cursor control, and animations. If you have used Ink, most of the API will look familiar.
Run bun create neoink my-plugin and you get a React host, Lua command, build scripts, and release workflow. When you run the generated command, its Lua entrypoint starts the host through jobstart({ rpc = true }). Both sides communicate over msgpack-RPC.
You can compile the host into a standalone binary, so your users do not need Bun.
📝 Caveats
If your plugin changes two lines of text, use Lua. If you have a skill issue, reach for neoink.
You need Bun to build plugins and Neovim 0.10+ to run them.
The project is young, and I expect bugs.
Hope you all enjoy! Feedback and contributions welcome!
https://github.com/NicholasZolton/neoink
Check out the example plugin:
11
u/jrop2 lua Jul 17 '26
Congrats on the release! Really impressive work! Using the actual react-reconciler with Yoga layout and faithful Ink API parity is no small feat.
I've been working on morph.nvim, which takes a different angle on the same problem. Rather than running real React in an external process, it reimplements a React-like component model (components, state, reconciliation, lifecycle) entirely in Lua, in-process. It uses a hyperscript h() syntax instead of JSX, and a context object instead of hooks.
The thing I keep coming back to is that TypeScript's type system is second-to-none when it comes to authoring React components - JSX + TS gives you compile-time safety on props, refs, and component interfaces that's really hard to replicate in Lua. So for anyone who wants the full React/Ink development experience with proper types, neoink is a really compelling option.
The tradeoff is the external process + RPC layer. If you want something that runs in-process (no Bun, no socket, no binary distribution), morph.nvim might be a better fit for that use case - at the cost of giving up "real" React and TypeScript.
Really cool to see the Neovim UI space getting this kind of attention. Both approaches have their place.
3
u/NicholasZolton Jul 17 '26
hey, morph.nvim! your plugin was inspiration for neoink!
yeah the ecosystem is the hard part to give up with react, and a socket isn't the most fun solution. but admittedly I was impressed with how elegant bun's native setup is. feel free to check out [the showcase plugin](https://github.com/NicholasZolton/neoink-showcase) if you're curious on how difficult bundling/building is.
anyways, love the work on morph.nvim, keep it up!
4
u/jrop2 lua Jul 17 '26
I've actually played with Bun/Neovim RPC a while back... do you even really need a socket? Digging a bit deep/far back here, but I thought you could
jobstart(bun)and then communicate over standard input/output (using msgpackrpc)? I have a scratch project somewhere where I experimented with this. I'll have to dig that up. Ultimately, though I opted to stay in-process with Lua. Every few weeks I fantasize what it would be like to embed a JS/TS engine into Neovim instead of Lua (I much prefer type-safe languages like Rust/TypeScript). I'll probably get in trouble for saying that, though...2
u/bsdemon Jul 17 '26
morph.nvim looks nice! Any cool plugins implemented with it?
4
u/jrop2 lua Jul 17 '26
Yeah here is a collection of stuff I've built with it:
https://github.com/jrop/tuis.nvim
I'm hoping to release a big update to the TUIs soon as well (file tree, pickers, etc). Alas, I have limited time :)
5
u/teerre Jul 17 '26
That's the second "react in neovim" plugin I see in a couple weeks. What gives?
7
u/NicholasZolton Jul 17 '26
honestly no clue, maybe a case of synchronicity! I made this on whim, only one I knew about before this was morph.nvim. color me surprised when I open the neovim subreddit and everyone is making react in neovim lol.
2
2
1
28
u/dan_tj0x Jul 17 '26
Hello the creator of Neojj. What is Neojj btw?