feat: added bootstrap code

This commit is contained in:
Folke Lemaitre 2022-11-29 12:49:15 +01:00
parent 0774f1bc25
commit ceeeda36e8
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,7 @@
- [ ] package-lock.lua
- [x] tag/version support `git tag --sort version:refname`
- [x] auto-loading on completion for lazy-loaded commands
- [x] bootstrap code
- [x] semver https://devhints.io/semver
https://semver.npmjs.com/

View File

@ -72,4 +72,19 @@ function M.stats()
return ret
end
function M.bootstrap()
local lazypath = vim.fn.stdpath("data") .. "/site/pack/lazy/start/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
vim.opt.runtimepath:append(lazypath)
end
end
return M