refactor(nvim): improve installation of lazy.nvim
This commit is contained in:
parent
4a920a818a
commit
2b721ac85b
@ -1,14 +1,18 @@
|
|||||||
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.uv.fs_stat(lazypath) then
|
||||||
vim.notify("Installing Lazy plugin manager, please wait...")
|
vim.notify("Installing Lazy plugin manager, please wait...")
|
||||||
vim.fn.system({
|
local status = vim.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"--single-branch",
|
"--single-branch",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
}):wait()
|
||||||
|
|
||||||
|
if status.code > 0 then
|
||||||
|
error("Failed to install lazy.nvim!\n====STDOUT====\n" .. status.stdout .. "\n====STDERR====\n" ..status.stderr)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
vim.opt.runtimepath:prepend(lazypath)
|
vim.opt.runtimepath:prepend(lazypath)
|
||||||
|
|
||||||
@ -21,7 +25,6 @@ lazy.setup("plugins.configs", {
|
|||||||
},
|
},
|
||||||
colorscheme = function()
|
colorscheme = function()
|
||||||
vim.cmd.colorscheme("kanagawa")
|
vim.cmd.colorscheme("kanagawa")
|
||||||
vim.notify("WTF!")
|
|
||||||
end,
|
end,
|
||||||
checker = {
|
checker = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user