Open chrisgrieser opened 1 year ago
From what I can tell, there's no reason not to delete all of them except the latest, perhaps the latest couple if you're nervous about something specifically.
It's not a bug of the plugin, per se, it's more just that it doesn't provide a mechanism of cleaning up old versions of the server. It wouldn't be exceedingly difficult to do, but the plugin author might consider it beyond the scope of what he intends to support, or just simply hasn't because he doesn't see it as much of a priority, or something like that.
If you'd like to contribute, this would be a good first issue to provide a solution for, I'd be surprised if they wouldn't accept the pull request. :)
yeah, I use this small code snippet in my build
which does the job. can make a PR at some point, but skimming through the code base, I have yet to find the correct location for inserting it
{
"jcdickinson/codeium.nvim",
dependencies = { "nvim-lua/plenary.nvim", "hrsh7th/nvim-cmp" },
build = function()
local bin_path = vim.fn.stdpath("data") .. "/codeium"
local oldBinaries = vim.fs.find(
function() return true end,
{ type = "file", 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,
},
Not sure whether this is an issue with this plugin or with codeium itself, but I noticed that the codium server binaries of previous versions are all kept, resulting in a bloated directory containing them:![CleanShot 2023-05-15 at 10 23 20@2x](https://github.com/jcdickinson/codeium.nvim/assets/73286100/80ee7275-b72f-4fff-adb4-f512e3dd6199)