Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(plugin): dynamically determine lazy.nvim origin spec#2016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
linw1995 wants to merge2 commits intofolke:main
base:main
Choose a base branch
Loading
fromlinw1995:main
Open
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
fix(plugin): update plugin configuration
  • Loading branch information
@linw1995
linw1995 committedJul 1, 2025
commitfc85da9a7daf1d1429434f4cd9999bf1599fefef
14 changes: 13 additions & 1 deletionlua/lazy/core/plugin.lua
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
Expand All@@ -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)

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp