mirror of https://github.com/folke/lazy.nvim.git
docs: updated bootstrap code to stable branch
This commit is contained in:
parent
cba99de3eb
commit
b4edbd09f5
10
README.md
10
README.md
|
@ -39,8 +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", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
|
vim.fn.system({
|
||||||
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
```
|
```
|
||||||
|
|
|
@ -68,8 +68,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", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
|
vim.fn.system({
|
||||||
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue