diff --git a/lua/lazy/core/handler/cmd.lua b/lua/lazy/core/handler/cmd.lua index ef7a2bd..658c957 100644 --- a/lua/lazy/core/handler/cmd.lua +++ b/lua/lazy/core/handler/cmd.lua @@ -35,7 +35,10 @@ function M:_add(cmd) local info = vim.api.nvim_get_commands({})[cmd] or vim.api.nvim_buf_get_commands(0, {})[cmd] if not info then - return Util.error("Command `" .. cmd .. "` not found after loading " .. plugins) + vim.schedule(function() + Util.error("Command `" .. cmd .. "` not found after loading " .. plugins) + end) + return end command.nargs = info.nargs