Skip to content

Commit

Permalink
fix: fresh install errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rafi committed May 17, 2024
1 parent 802a959 commit df4fa03
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lua/rafi/config/lazy.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
-- Rafael Bodill's lazy.nvim initialization
-- https://github.com/rafi/vim-config

local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.uv.fs_stat(lazypath) then
print('Installing lazy.nvim…')
-- stylua: ignore
vim.fn.system({ 'git', 'clone', '--filter=blob:none', 'https://github.com/folke/lazy.nvim.git', '--branch=stable', lazypath })
-- Clone bootstrap repositories if not already installed.
vim.uv = vim.uv or vim.loop
local function clone(remote, dest)
if not vim.uv.fs_stat(dest) then
print('Installing ' .. dest .. '')
-- stylua: ignore
vim.fn.system({ 'git', 'clone', '--filter=blob:none', remote, '--branch=stable', dest })
end
end
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
clone('https://github.com/folke/lazy.nvim.git', lazypath)
---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
clone('https://github.com/LazyVim/LazyVim.git', vim.fn.stdpath('data') .. '/lazy/LazyVim')

-- Load user options from lua/config/setup.lua
local user_lazy_opts = {}
Expand Down

0 comments on commit df4fa03

Please sign in to comment.