[Lazy] Update to better initial load

This commit is contained in:
2025-11-04 19:47:05 +01:00
parent 75be761160
commit 91917f3109
2 changed files with 14 additions and 4 deletions

View File

@@ -1,3 +1,3 @@
require("options") require("options")
require("keybinds") require("keybinds")
require("lazy-conf") require("lazy")

View File

@@ -1,13 +1,23 @@
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 or vim.loop).fs_stat(lazypath) then
vim.fn.system({ local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release "--branch=stable", -- latest stable release
lazyrepo,
lazypath, lazypath,
}) })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)