mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 19:34:15 +00:00
Revert changes to bootstrapping, make checkhealth produce more meaningful message.
This commit is contained in:
parent
f03bf0a82b
commit
d3ce9aceb3
3 changed files with 15 additions and 9 deletions
11
README.md
11
README.md
|
@ -39,11 +39,14 @@ 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({ "git", "clone",
|
vim.fn.system({
|
||||||
"--filter=blob:none", "--depth=1",
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
lazypath })
|
"--branch=stable", -- latest stable release
|
||||||
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
lazypath,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
```
|
```
|
||||||
|
|
|
@ -54,7 +54,7 @@ function M.check()
|
||||||
|
|
||||||
local spec = Config.spec
|
local spec = Config.spec
|
||||||
if spec == nil then
|
if spec == nil then
|
||||||
ok("no packages setup for installation so far.")
|
error("No plugins loaded. Did you forget to run `require(\"lazy\").setup()`?")
|
||||||
else
|
else
|
||||||
for _, plugin in pairs(spec.plugins) do
|
for _, plugin in pairs(spec.plugins) do
|
||||||
M.check_valid(plugin)
|
M.check_valid(plugin)
|
||||||
|
|
|
@ -96,11 +96,14 @@ 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({ "git", "clone",
|
vim.fn.system({
|
||||||
"--filter=blob:none", "--depth=1",
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
lazypath })
|
"--branch=stable", -- latest stable release
|
||||||
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
lazypath,
|
||||||
|
})
|
||||||
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