ensure lazyvim will work on older neovim by adding fallback to vim.loop

This commit is contained in:
tdback 2024-11-14 21:57:22 -05:00
parent 9dfed2914e
commit c23f2e8e99

View file

@ -2,15 +2,15 @@ vim.g.mapleader = " "
vim.g.maplocalleader = " "
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--branch=stable",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
})
end
vim.opt.rtp:prepend(lazypath)