mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-27 03:09:07 +02:00
refactor: move ai extras to ai instead of coding
This commit is contained in:
parent
b9dae57961
commit
725469adba
6 changed files with 8 additions and 1 deletions
|
@ -135,7 +135,7 @@ local defaults = {
|
||||||
}
|
}
|
||||||
|
|
||||||
M.json = {
|
M.json = {
|
||||||
version = 6,
|
version = 7,
|
||||||
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
|
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
|
||||||
data = {
|
data = {
|
||||||
version = nil, ---@type string?
|
version = nil, ---@type string?
|
||||||
|
|
|
@ -90,6 +90,13 @@ function M.migrate()
|
||||||
json.data.extras = vim.tbl_filter(function(extra)
|
json.data.extras = vim.tbl_filter(function(extra)
|
||||||
return not (extra == "lazyvim.plugins.extras.editor.trouble-v3")
|
return not (extra == "lazyvim.plugins.extras.editor.trouble-v3")
|
||||||
end, json.data.extras or {})
|
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
|
end
|
||||||
|
|
||||||
M.save()
|
M.save()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue