Skip to content

Commit e610d68

Browse files
committed
feat(lazy): devpath
1 parent 4ed9ce0 commit e610d68

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

nvim/lua/config/lazy.lua

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
local use_dev = true
22

3-
if use_dev then
4-
vim.opt.runtimepath:prepend(vim.fn.expand("~/projects/lazy.nvim"))
5-
else
6-
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
7-
if not vim.uv.fs_stat(lazypath) then
8-
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
9-
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
10-
end
11-
vim.opt.rtp:prepend(lazypath)
3+
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
4+
local devpath = vim.fn.expand("~/projects/lazy.nvim")
5+
if use_dev and vim.uv.fs_stat(devpath) then
6+
lazypath = devpath
7+
elseif not vim.uv.fs_stat(lazypath) then
8+
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
9+
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
1210
end
11+
vim.opt.rtp:prepend(lazypath)
1312

1413
local M = {}
1514

0 commit comments

Comments
 (0)