Skip to content

Commit 1c9ba37

Browse files
committed
fix(bootstrap): support for older Neovim versions
1 parent 96a205c commit 1c9ba37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bootstrap.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@
66
local M = {}
77

88
function M.setup()
9+
local uv = vim.uv or vim.loop
910
if vim.env.LAZY_STDPATH then
1011
local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p"):gsub("[\\/]$", "")
1112
for _, name in ipairs({ "config", "data", "state", "cache" }) do
1213
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
1314
end
1415
end
1516

16-
if vim.env.LAZY_PATH and not vim.uv.fs_stat(vim.env.LAZY_PATH) then
17+
if vim.env.LAZY_PATH and not uv.fs_stat(vim.env.LAZY_PATH) then
1718
vim.env.LAZY_PATH = nil
1819
end
1920

2021
local lazypath = vim.env.LAZY_PATH or vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
21-
if not vim.env.LAZY_PATH and not (vim.uv or vim.loop).fs_stat(lazypath) then
22+
if not vim.env.LAZY_PATH and not uv.fs_stat(lazypath) then
2223
vim.api.nvim_echo({
2324
{
2425
"Cloning lazy.nvim\n\n",

0 commit comments

Comments
 (0)