Skip to content

Commit ceeeda3

Browse files
committed
feat: added bootstrap code
1 parent 0774f1b commit ceeeda3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [ ] package-lock.lua
2020
- [x] tag/version support `git tag --sort version:refname`
2121
- [x] auto-loading on completion for lazy-loaded commands
22+
- [x] bootstrap code
2223
- [x] semver https://devhints.io/semver
2324
https://semver.npmjs.com/
2425

lua/lazy/init.lua

+15
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,19 @@ function M.stats()
7272
return ret
7373
end
7474

75+
function M.bootstrap()
76+
local lazypath = vim.fn.stdpath("data") .. "/site/pack/lazy/start/lazy.nvim"
77+
if not vim.loop.fs_stat(lazypath) then
78+
vim.fn.system({
79+
"git",
80+
"clone",
81+
"--filter=blob:none",
82+
"--single-branch",
83+
"https://github.com/folke/lazy.nvim.git",
84+
lazypath,
85+
})
86+
vim.opt.runtimepath:append(lazypath)
87+
end
88+
end
89+
7590
return M

0 commit comments

Comments
 (0)