Compare commits

...

1 Commits
v13.5.2 ... ai

Author SHA1 Message Date
725469adba refactor: move ai extras to ai instead of coding 2024-11-10 11:25:55 +01:00
6 changed files with 8 additions and 1 deletions

View File

@ -135,7 +135,7 @@ local defaults = {
}
M.json = {
version = 6,
version = 7,
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
data = {
version = nil, ---@type string?

View File

@ -90,6 +90,13 @@ function M.migrate()
json.data.extras = vim.tbl_filter(function(extra)
return not (extra == "lazyvim.plugins.extras.editor.trouble-v3")
end, json.data.extras or {})
elseif json.data.version == 6 then
local ai = { "copilot", "codeium", "copilot-chat", "tabnine" }
json.data.extras = vim.tbl_map(function(extra)
return extra:gsub("^lazyvim%.plugins%.extras%.coding%.(.*)$", function(name)
return vim.tbl_contains(ai, name) and ("lazyvim.plugins.extras.ai." .. name) or extra
end)
end, json.data.extras or {})
end
M.save()