-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugin): dev.path can now be a function (#1157)
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, }, }) ```
- Loading branch information
Showing
3 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters