mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-11-10 19:24:39 +00:00
In some case, `dev.path .. plugin.name` is not enoguh.
For example, when using `ghq` to manage projects, plugin directories may
vary by onewrs of the plugins.
With this change, users can do something like below
``` lua
require("lazy").setup("plugins", {
dev = {
path = function(p)
-- ghq
local path, cnt = string.gsub(p.url, "^https://(.*)%.git$", "~/ghq/%1")
if cnt == 1 then
return path
end
-- fallback to default
return "~/projects/" .. plugin.name
end,
},
})
```
|
||
|---|---|---|
| .. | ||
| handler | ||
| cache.lua | ||
| config.lua | ||
| loader.lua | ||
| plugin.lua | ||
| util.lua | ||