mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-07-21 20:55:12 +00:00
fix(plugin): update plugin configuration
This commit is contained in:
parent
6db4274a36
commit
fc85da9a7d
1 changed files with 13 additions and 1 deletions
|
@ -315,6 +315,18 @@ function M.find_local_spec()
|
|||
end
|
||||
end
|
||||
|
||||
function M.find_actual_origin_spec()
|
||||
local info = debug.getinfo(2, "S")
|
||||
local current_file = info.source:sub(2) -- remove the leading '@'
|
||||
local current_dir = vim.fn.fnamemodify(current_file, ":h")
|
||||
local git_root = Util.find_git_root(current_dir)
|
||||
local Git = require("lazy.manage.git")
|
||||
|
||||
return {
|
||||
url = Git.get_origin(git_root),
|
||||
}
|
||||
end
|
||||
|
||||
function M.load()
|
||||
M.loading = true
|
||||
-- load specs
|
||||
|
@ -326,7 +338,7 @@ function M.load()
|
|||
vim.deepcopy(Config.options.spec),
|
||||
}
|
||||
specs[#specs + 1] = M.find_local_spec()
|
||||
specs[#specs + 1] = { "folke/lazy.nvim" }
|
||||
specs[#specs + 1] = M.find_actual_origin_spec()
|
||||
|
||||
Config.spec:parse(specs)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue