home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

An Alternate Way To Run An External Async Command In Neovim

March 2023

This is a draft for an alt way to run an external command. I don't use it, I use plenary. See post 2ngtllokpfsv for the way I use.

Here's an example of how to setup a Neovim plugin to make an external async call.

Code
local async_test_function = function()
  local output = ""
  local cmd = {'bash', '-c', 'sleep 2; echo "PING"'}
  vim.fn.jobstart(cmd, {
    on_stdout = function(j, d, e)
      output = output .. vim.fn.join(d)
      print(output)
    end
  })
end
TODO: pre
═══ § ═══