mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-29 03:44:14 +00:00
Fix back bootstrapping and healthcheck for fresh install with no packages to fetch.
This commit is contained in:
parent
903f0fe542
commit
f03bf0a82b
3 changed files with 25 additions and 27 deletions
11
README.md
11
README.md
|
@ -39,14 +39,11 @@ You can add the following Lua code to your `init.lua` to bootstrap **lazy.nvim**
|
||||||
```lua
|
```lua
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({ "git", "clone",
|
||||||
"git",
|
"--filter=blob:none", "--depth=1",
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
lazypath })
|
||||||
lazypath,
|
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
||||||
})
|
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
```
|
```
|
||||||
|
|
|
@ -53,6 +53,9 @@ function M.check()
|
||||||
end
|
end
|
||||||
|
|
||||||
local spec = Config.spec
|
local spec = Config.spec
|
||||||
|
if spec == nil then
|
||||||
|
ok("no packages setup for installation so far.")
|
||||||
|
else
|
||||||
for _, plugin in pairs(spec.plugins) do
|
for _, plugin in pairs(spec.plugins) do
|
||||||
M.check_valid(plugin)
|
M.check_valid(plugin)
|
||||||
M.check_override(plugin)
|
M.check_override(plugin)
|
||||||
|
@ -70,6 +73,7 @@ function M.check()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param plugin LazyPlugin
|
---@param plugin LazyPlugin
|
||||||
|
|
|
@ -96,14 +96,11 @@ end
|
||||||
function M.bootstrap()
|
function M.bootstrap()
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({ "git", "clone",
|
||||||
"git",
|
"--filter=blob:none", "--depth=1",
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
lazypath })
|
||||||
lazypath,
|
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
||||||
})
|
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue