Our great sponsors
-
plenary.nvim
plenary: full; complete; entire; absolute; unqualified. All the lua functions I don't want to write twice.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I'm trying to write a function that sends the current buffer content via stdin to an arbitrary command. I've gone through the luv documentation, and I'm able to write to stdin and capture stdout and stderr successfully. However, after a large number of calls (1000+), I keep running into memory leaks and errors from other plugins that use luv.
I've pored through plenary.nvim's jobs implementation and have gotten to the point where I haven't crashed for several hours, but I want to make sure that my implementation is OK, since it's part of a plugin. I can see that Plenary jobs use checks to ensure that all pipes are closed before closing the handle, but I'm not sure at what point in the lifecycle I should check (or if it's necessary at all).