Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lua/copilot/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function M.use_client(callback)
return
end

local timer, err, _ = vim.loop.new_timer()
local timer, err, _ = vim.uv.new_timer()

if not timer then
logger.error(string.format("error creating timer: %s", err))
Expand Down Expand Up @@ -249,6 +249,8 @@ local function prepare_client_config(overrides)
end
end

local editor_info = util.get_editor_info()

-- LSP config, not to be confused with config.lua
return vim.tbl_deep_extend("force", {
cmd = {
Expand Down Expand Up @@ -303,6 +305,11 @@ local function prepare_client_config(overrides)
handlers = handlers,
init_options = {
copilotIntegrationId = "vscode-chat",
-- Fix LSP warning: editorInfo and editorPluginInfo will soon be required in initializationOptions
-- We are sending these twice for the time being as it will become required here and we get a warning if not set.
-- However if not passed in setEditorInfo, that one returns an error.
editorInfo = editor_info.editorInfo,
editorPluginInfo = editor_info.editorPluginInfo,
},
workspace_folders = workspace_folders,
trace = config.get("trace") or "off",
Expand Down