Skip to content

Commit 82e696b

Browse files
committed
modify defaults to help with stability
1 parent 3417fde commit 82e696b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lua/copilot/client.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ M.merge_server_opts = function (params)
2525
on_init = function(_, _)
2626
vim.schedule(M.buf_attach_copilot)
2727
vim.schedule(register_autocmd)
28-
vim.schedule(function ()
29-
params.extensions[params.cmp.method](params.cmp.max_results)
30-
end)
28+
params.extensions[params.cmp.method](params.cmp.max_results)
3129
end,
3230
settings = params.settings,
3331
}, params.server_opts_overrides or {})

lua/copilot/init.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local client = require("copilot.client")
33

44
local defaults = {
55
cmp = {
6-
method = "getPanelCompletions",
6+
method = "getCompletionsCycling",
77
max_results = 5,
88
},
99
extensions = {
@@ -32,8 +32,10 @@ end
3232

3333
M.setup = function(opts)
3434
local user_config = config_handler(opts)
35-
require("copilot.extensions.panel").create()
36-
vim.schedule(function () client.start(user_config) end)
35+
vim.schedule(function ()
36+
client.start(user_config)
37+
require("copilot.extensions.panel").create()
38+
end)
3739
end
3840

3941
return M

0 commit comments

Comments
 (0)