Skip to content

Commit 5c23711

Browse files
committed
fix: command complete when async source
1 parent 3b3e43f commit 5c23711

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/strive/init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,9 @@ function Plugin:cmd(commands)
902902
bang = true,
903903
complete = function(_, cmd_line)
904904
if not self.loaded then
905-
return self:load()
905+
self:load()
906+
-- wait async source for get completion of command
907+
vim.wait(10)
906908
end
907909
local ok, result = pcall(vim.fn.getcompletion, cmd_line, 'cmdline')
908910
return ok and result or {}

0 commit comments

Comments
 (0)