You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time eca-nvim downloads the server, my nvim gets stuck until the download is complete. See the GIF below:
I'm wondering if this is something that only happens to me. The fix should be simple by spawning the server start process in another thread. Could be using uv.spawn or plenary.async. I don't think the change in that behavior will impact the current flow, WDYT?
I'm a fan of using vim.system to manage the server process. It is available since vim > 0.10 but you can easily add a compatibility layer to support older neovims.
--- copy system.lua from neovim runtimevim.system=vim.systemorrequire("eca.system")
vim.system("eca server", {
stdout=function(data, err)
print(data)
end,
stderr=function(data, err)
print(data)
end
}, some_on_exit_function())
@tomgeorge, I don't know vim.system, so I'll take a look, thanks for sharing.
My initial idea was to do a minimal change like:
Changing this:
-- Start server automatically in backgroundvim.defer_fn(function()
M.server:start()
end, 100) -- Small delay to ensure everything is loaded
To something like this
-- Start server automatically in backgroundlocalok, async=pcall(require, "plenary.async")
ifokthenasync.run(function()
M.server:start()
end)
elsevim.defer_fn(function()
M.server:start()
end, 100) -- Small delay to ensure everything is loadedend
Activity
joaopluigi commentedon Aug 6, 2025
The piece of code to change:
eca-nvim/lua/eca/init.lua
Line 270 in 60c6afa
I'm unsure if other
server startoccurrences, such asEcaStartServercommand, should also have the async behavior.tomgeorge commentedon Aug 6, 2025
I'm a fan of using
vim.systemto manage the server process. It is available since vim > 0.10 but you can easily add a compatibility layer to support older neovims.joaopluigi commentedon Aug 7, 2025
@tomgeorge, I don't know
vim.system, so I'll take a look, thanks for sharing.My initial idea was to do a minimal change like:
Changing this:
To something like this
joaopluigi commentedon Oct 8, 2025
Solved by #48