diff --git a/README.md b/README.md index 193ce5f..7292e4a 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,14 @@ You can add the following Lua code to your `init.lua` to bootstrap **lazy.nvim** ```lua local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ "git", "clone", - "--filter=blob:none", "--depth=1", + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", - lazypath }) - vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) ``` diff --git a/lua/lazy/health.lua b/lua/lazy/health.lua index 7943dd8..f0ccb22 100644 --- a/lua/lazy/health.lua +++ b/lua/lazy/health.lua @@ -54,7 +54,7 @@ function M.check() local spec = Config.spec 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 for _, plugin in pairs(spec.plugins) do M.check_valid(plugin) diff --git a/lua/lazy/init.lua b/lua/lazy/init.lua index aa6f430..2b41ffd 100644 --- a/lua/lazy/init.lua +++ b/lua/lazy/init.lua @@ -96,11 +96,14 @@ end function M.bootstrap() local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ "git", "clone", - "--filter=blob:none", "--depth=1", + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", - lazypath }) - vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) end