Skip to content

Commit b6e94db

Browse files
committed
feat: wait for copilot to start for 'Copilot' command
1 parent bb8540f commit b6e94db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/copilot.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ vim.api.nvim_create_user_command("Copilot", function(opts)
3737
return
3838
end
3939

40-
if not u.get_copilot_client() then
40+
local is_running = vim.wait(5000, function()
41+
return not not u.get_copilot_client()
42+
end)
43+
44+
if not is_running then
4145
print("[Copilot] Not running")
4246
return
4347
end

0 commit comments

Comments
 (0)