lazy.lua
1 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 if not (vim.uv or vim.loop).fs_stat(lazypath) then 3 local lazyrepo = "https://github.com/folke/lazy.nvim.git" 4 local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) 5 if vim.v.shell_error ~= 0 then 6 vim.api.nvim_echo({ 7 { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, 8 { out, "WarningMsg" }, 9 { "\nPress any key to exit..." }, 10 }, true, {}) 11 vim.fn.getchar() 12 os.exit(1) 13 end 14 end 15 vim.opt.rtp:prepend(lazypath)