From 11fe8e25d65c79dbbb0e18ce26ace9218df7897a Mon Sep 17 00:00:00 2001 From: Lilin Lao Date: Tue, 10 Oct 2023 11:20:18 +0800 Subject: [PATCH 1/4] Update config.lua Add `override_download_url` to `config`. --- lua/codeium/config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/codeium/config.lua b/lua/codeium/config.lua index 069103c..123f8a7 100644 --- a/lua/codeium/config.lua +++ b/lua/codeium/config.lua @@ -5,6 +5,7 @@ function M.defaults() manager_path = nil, bin_path = vim.fn.stdpath("cache") .. "/codeium/bin", config_path = vim.fn.stdpath("cache") .. "/codeium/config.json", + override_download_url = "https://github.com", api = { host = "server.codeium.com", port = "443", From bfe9b422e92c4cfdedef692536927377a14c40b2 Mon Sep 17 00:00:00 2001 From: Lilin Lao Date: Tue, 10 Oct 2023 11:29:39 +0800 Subject: [PATCH 2/4] Update update.lua Add `override_download_url`. --- lua/codeium/update.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/codeium/update.lua b/lua/codeium/update.lua index 3870a39..06d8e27 100644 --- a/lua/codeium/update.lua +++ b/lua/codeium/update.lua @@ -5,6 +5,7 @@ local notify = require("codeium.notify") local M = {} local cached = nil +local override_download_url = "https://github.com" function M.get_bin_info() if cached then return cached @@ -16,7 +17,11 @@ function M.get_bin_info() } return cached end - + + if config.options.override_download_url then + override_download_url = config.options.override_download_url + end + local os_info = io.get_system_info() local dir = config.options.bin_path .. "/" .. versions.extension local bin_sufix @@ -32,7 +37,8 @@ function M.get_bin_info() dir = dir, bin_sufix = bin_sufix, bin = dir .. "/" .. "language_server_" .. bin_sufix, - download_url = "https://github.com/Exafunction/codeium/releases/download/language-server-v" + download_url = override_download_url + .. "/Exafunction/codeium/releases/download/language-server-v" .. versions.extension .. "/language_server_" .. bin_sufix From fda2662d430991820b58c69069b37ae8fc381bab Mon Sep 17 00:00:00 2001 From: Lilin Lao Date: Wed, 11 Oct 2023 08:47:47 +0800 Subject: [PATCH 3/4] Change override_download_url to language_server_download_url --- lua/codeium/update.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/codeium/update.lua b/lua/codeium/update.lua index 06d8e27..a6a88d0 100644 --- a/lua/codeium/update.lua +++ b/lua/codeium/update.lua @@ -5,7 +5,7 @@ local notify = require("codeium.notify") local M = {} local cached = nil -local override_download_url = "https://github.com" +local language_server_download_url = "https://github.com" function M.get_bin_info() if cached then return cached @@ -18,8 +18,8 @@ function M.get_bin_info() return cached end - if config.options.override_download_url then - override_download_url = config.options.override_download_url + if config.options.language_server_download_url then + language_server_download_url = config.options.language_server_download_url end local os_info = io.get_system_info() @@ -37,7 +37,7 @@ function M.get_bin_info() dir = dir, bin_sufix = bin_sufix, bin = dir .. "/" .. "language_server_" .. bin_sufix, - download_url = override_download_url + download_url = language_server_download_url .. "/Exafunction/codeium/releases/download/language-server-v" .. versions.extension .. "/language_server_" From 1c67d4bef3e30bb71278634de29ddb39a0a37317 Mon Sep 17 00:00:00 2001 From: Lilin Lao Date: Wed, 11 Oct 2023 08:48:15 +0800 Subject: [PATCH 4/4] Change override_download_url to language_server_download_url --- lua/codeium/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/codeium/config.lua b/lua/codeium/config.lua index 123f8a7..18fec5c 100644 --- a/lua/codeium/config.lua +++ b/lua/codeium/config.lua @@ -5,7 +5,7 @@ function M.defaults() manager_path = nil, bin_path = vim.fn.stdpath("cache") .. "/codeium/bin", config_path = vim.fn.stdpath("cache") .. "/codeium/config.json", - override_download_url = "https://github.com", + language_server_download_url = "https://github.com", api = { host = "server.codeium.com", port = "443",