DEV Community

Discussion on: (Nvim) Lua for Javascripters: Spawning Processes

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️ • Edited

One of the major differences is that in Lua you are responsible for cleaning up both the process handle and any pipes you have open to receive data from that handle.

That's not entirely true: This is not related to Lua itself, but to the nvim API. Lua itself doesn't really have a concept of pipes or processes or anything like that.

There's also no real reason to actually do all of this in Lua: you can just use RPC protocol that nvim comes with to do all of the logic in javascript in a separate process.

It's also simpler to just write this kind of stuff in vimscript, most of the time.