Is asynchronous code in neovim-Lua the same as it is in JS?
Hello everybody. I have been taking a look at IO in Lua recently and I see there are some asynchronous APIS there. I am an experienced JS developer, so I'm more than familiar with asynchronous programming and the event loop. However, by reading the Lua docs, neovim docs and the plenary docs is still not clear to me how the asynchronous code works exactly in Lua. In Javascript, everything that is asynchronous is because depends on some external resource, and while it waits for that resource to answer the rest of the events can be processed. But I'm not sure if it is like this in Lua, and particularly in the neovim methods for reading documents or calling external commands. The code snippets I saw make use of Lua coroutines and they give me the impression that the code behaves like normal synchronous code: when you try to consume a coroutines the calling code seems to wait for it, so I'm not sure what is the point if it is like that. Am I wrong and it works exactly like in Javascript? If I call an external command from neovim the editor will not block while it is being executed despite my code looks like regular synchronous code? Thanks all