From b4edbd09f5a5de2f9260c2e6a54e8bf00d3070d1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 31 Dec 2022 09:44:17 +0100 Subject: [PATCH] docs: updated bootstrap code to stable branch --- README.md | 10 ++++++++-- lua/lazy/init.lua | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7621ea2..ea93722 100644 --- a/README.md +++ b/README.md @@ -39,8 +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", "https://github.com/folke/lazy.nvim.git", lazypath }) - vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) ``` diff --git a/lua/lazy/init.lua b/lua/lazy/init.lua index cc6d2b3..b08b5b5 100644 --- a/lua/lazy/init.lua +++ b/lua/lazy/init.lua @@ -68,8 +68,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", "https://github.com/folke/lazy.nvim.git", lazypath }) - vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) end