fix(pack): move plugins out from lua runtime path

This commit is contained in:
2026-04-15 05:07:29 +02:00
parent 0211ed53a1
commit 1293be93aa
16 changed files with 6 additions and 6 deletions
+6 -6
View File
@@ -34,12 +34,12 @@ end
---@param name string ---@param name string
---@return string? ---@return string?
local function normalize_name(name) local function normalize_name(name)
name = name:match("[^.]+") name = name:gsub("%.lua$", "")
if name then name = name:gsub("%.nvim$", "")
return name:lower() if name == "" then
end
return nil return nil
end
return name:lower()
end end
---@param plugin ow.Pack.Plugin ---@param plugin ow.Pack.Plugin
@@ -49,7 +49,7 @@ local function load(plugin)
log.error("Invalid plugin name: %s", plugin.name) log.error("Invalid plugin name: %s", plugin.name)
return return
end end
local path = string.format("%s/lua/plugins/%s.lua", config_dir, name) local path = vim.fs.joinpath(config_dir, "plugins", name .. ".lua")
if vim.uv.fs_stat(path) then if vim.uv.fs_stat(path) then
local ok, err = exec(path) local ok, err = exec(path)