Skip to content

Commit

Permalink
feat: added bootstrap code
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 29, 2022
1 parent 0774f1b commit ceeeda3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
15 changes: 15 additions & 0 deletions lua/lazy/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ceeeda3

Please sign in to comment.