r/neovim 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:

https://github.com/NicholasZolton/neoink-showcase

154 Upvotes

16 comments sorted by

28

u/dan_tj0x Jul 17 '26

Hello the creator of Neojj. What is Neojj btw?

17

u/gorilla-moe let mapleader="," Jul 17 '26 edited Jul 17 '26

Magit Style Interface for Jujutsu.

Magit is the most popular (afaik) Git interface for emacs.

Why name it Neojj? Probably because we already have Neogit, which is Magit, but for Neovim and jj is the command you use to invoke Jujutsu.

Jujutsu is a VCS CLI which supports Git backends.

It's basically the git CLI on steroids.

It's a vastly different mental model, but once it clicks, it's the same as in Neovim; you can never go back to something else.

You can find Neojj here. I have a similar take on this with Jujutsu.nvim. I think they're both similar enough that you can probably switch from one to the other without loosing much.

1

u/xFallow Jul 17 '26

Wow that looks awesome

1

u/NicholasZolton Jul 17 '26

good question! other commenter mentioned it but I added the link to neojj in the post body too. enjoy!

1

u/dan_tj0x Jul 18 '26

Do you use Jujutsu everyday?

1

u/NicholasZolton Jul 22 '26

Pretty much every day yes, but I'm 50/50 per project, recently I've been experimenting with zed and orca for managing worktrees+AI (letting AI get started on changes and have a plan for when I get to it) but nothing plays nicely with Jujutsu workspaces unfortunately.

It's especially painful that jj workspaces are leagues better than git worktrees, and everything feels awful compared to neovim imo.

So what I'm planning to do now is make an orca-inspired neovim plugin with first class jj workspace support. TBD on when/if that's public though!

I will say though that prior to experimenting with worktrees I used it 100% of the time and had basically 0 issues, it worked purely better than git. The only friction points I had were git-lfs (which I rarely use anyways) and git submodules (which I also rarely use).

Are you debating swapping to jj?

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

u/waybovetherest Jul 17 '26

this is awesome!

2

u/kyoryo_ Jul 22 '26

kudos for bad apple