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 = " " vim.g.maplocalleader = " "
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system { vim.fn.system({
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"--branch=stable", "--branch=stable",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
lazypath, lazypath,
} })
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)