vim: enable alternative plugin dev paths in lazy.nvim
I have to keep the local development version of my plugins in different places depending on the machine. This make that possible.
This commit is contained in:
parent
ee08716bed
commit
267c01ff9d
1 changed files with 11 additions and 1 deletions
|
@ -15,6 +15,16 @@ local bootstrap = function(path)
|
|||
return vim.F.npcall(require, 'lazy')
|
||||
end
|
||||
|
||||
local dev_path = function()
|
||||
local paths = {
|
||||
'~/Projects/nvim-plugins',
|
||||
'~/.local/src',
|
||||
}
|
||||
paths = vim.tbl_map(vim.fn.expand, paths)
|
||||
paths = vim.tbl_filter(vim.loop.fs_stat, paths)
|
||||
return paths[1]
|
||||
end
|
||||
|
||||
M.setup = function()
|
||||
local lazy = bootstrap(vim.fn.stdpath('data') .. '/lazy/lazy.nvim')
|
||||
if not lazy then
|
||||
|
@ -27,7 +37,7 @@ M.setup = function()
|
|||
lazy.setup {
|
||||
spec = 'fschauen.plugins',
|
||||
dev = {
|
||||
path = '~/Projects/nvim-plugins',
|
||||
path = dev_path(),
|
||||
fallback = true,
|
||||
},
|
||||
ui = {
|
||||
|
|
Loading…
Add table
Reference in a new issue