mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-13 19:04:36 +02:00
feat: dynamically determine LazyVim origin spec
Replace hardcoded repository reference with dynamic origin detection to support different LazyVim forks automatically.
This commit is contained in:
parent
25abbf546d
commit
b7de8b5f8e
1 changed files with 16 additions and 1 deletions
|
@ -10,9 +10,24 @@ end
|
|||
|
||||
require("lazyvim.config").init()
|
||||
|
||||
local Git = require("lazy.manage.git")
|
||||
local Util = require("lazy.core.util")
|
||||
|
||||
local function find_actual_origin_spec()
|
||||
local current_dir = vim.fn.fnamemodify(Util.get_source(), ":h")
|
||||
return {
|
||||
url = Git.get_origin(Util.find_git_root(current_dir)),
|
||||
priority = 10000,
|
||||
lazy = false,
|
||||
opts = {},
|
||||
cond = true,
|
||||
version = "*",
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
{ "folke/lazy.nvim", version = "*" },
|
||||
{ "LazyVim/LazyVim", priority = 10000, lazy = false, opts = {}, cond = true, version = "*" },
|
||||
find_actual_origin_spec(),
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue