mirror of https://github.com/folke/lazy.nvim.git
refactor: renamed plugins_local to dev
This commit is contained in:
parent
47f5c124aa
commit
5d81c5062b
|
@ -6,10 +6,10 @@ local M = {}
|
||||||
M.defaults = {
|
M.defaults = {
|
||||||
opt = true,
|
opt = true,
|
||||||
plugins = "config.plugins",
|
plugins = "config.plugins",
|
||||||
plugins_local = {
|
dev = {
|
||||||
path = vim.fn.expand("~/projects"),
|
path = vim.fn.expand("~/projects"), -- the path where you store your projects
|
||||||
---@type string[]
|
---@type string[]
|
||||||
patterns = {},
|
patterns = {}, -- For example {"folke"}
|
||||||
},
|
},
|
||||||
packpath = vim.fn.stdpath("data") .. "/site/pack/lazy",
|
packpath = vim.fn.stdpath("data") .. "/site/pack/lazy",
|
||||||
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json",
|
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json",
|
||||||
|
|
|
@ -86,9 +86,9 @@ function Spec:add(plugin, is_dep)
|
||||||
plugin.dep = is_dep
|
plugin.dep = is_dep
|
||||||
|
|
||||||
-- check for plugins that should be local
|
-- check for plugins that should be local
|
||||||
for _, pattern in ipairs(Config.options.plugins_local.patterns) do
|
for _, pattern in ipairs(Config.options.dev.patterns) do
|
||||||
if plugin[1]:find(pattern, 1, true) then
|
if plugin[1]:find(pattern, 1, true) then
|
||||||
plugin.uri = Config.options.plugins_local.path .. "/" .. plugin.name
|
plugin.uri = Config.options.dev.path .. "/" .. plugin.name
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue