Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions lua/codeium/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function Server:start()
end

local function on_output(_, v, j)
log.debug(j.pid .. ": " .. v)
log.debug(j.pid .. ": " .. (v or "v is null"))
end

local api_server_url = "https://"
Expand Down Expand Up @@ -286,7 +286,7 @@ function Server:start()
table.insert(job_args, "--detect_proxy=" .. tostring(config.options.detect_proxy))
end

self.job = io.job(job_args)
self.job = io.job(job_args, config.options.env)
self.job:start()

local function start_heartbeat()
Expand Down
2 changes: 2 additions & 0 deletions lua/codeium/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ function M.defaults()
search_max_workspace_file_count = 5000,
file_watch_max_dir_count = 50000,
enable_cmp_source = true,
env = { ["someproxy"] = "some url" }, -- kinba
mute_notify = true, -- kinba
virtual_text = {
enabled = false,
filetypes = {},
Expand Down
5 changes: 4 additions & 1 deletion lua/codeium/io.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function M.get_system_info()
end

---@return plenary.Job
function M.job(cmd)
function M.job(cmd, env)
local o = config.options
local tool_name = cmd[1]
local tool = o.tools[tool_name]
Expand Down Expand Up @@ -272,6 +272,9 @@ function M.job(cmd)
end

local result = {}
if env then
result.env = env
end
result.args = {}

for k, v in pairs(cmd) do
Expand Down