fix(pack): move plugins out from lua runtime path
This commit is contained in:
+6
-6
@@ -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
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
return name:lower()
|
||||||
return nil
|
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user