Open chrisgrieser opened 1 year ago
Yes, the reason we don't do so by default is that there may be multiple IDEs for Codeium which are not updated in sync, so it's hard to know which versions are still needed. Open to adding a setting to delete the old versions.
I see. Yeah, an option sounds good!
ok, so since the directory accumulated a total of 3gb for me by now, I hacked together a small temporary solution. Posting this here in case anyone finds this via search.
Using the build
spec from lazy.nvim, this deletes all but the up-to-date binary from the system, on every update of the plugin.
{
"Exafunction/codeium.vim",
build = function()
local bin_path = os.getenv("HOME") .. "/.codeium/bin"
local oldBinaries =
vim.fs.find("language_server_macos_arm", { limit = math.huge, path = bin_path })
table.remove(oldBinaries) -- remove last item (= most up to date binary) from list
for _, binaryPath in pairs(oldBinaries) do
os.remove(binaryPath)
os.remove(vim.fs.dirname(binaryPath))
end
end,
},
It appears with every update of codeium.vim, there is one more binary here. My guess is that the plugin does not remove the outdated binaries?