1
0

chore(nvim): clean config

This commit is contained in:
2025-07-05 07:52:05 +02:00
parent 10caaf81c1
commit 4e43881829
8 changed files with 229 additions and 436 deletions

View File

@@ -0,0 +1,32 @@
--- @class Lazy
--- @field setup fun(opts: table)
local M = {}
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
--- @nodiscard
--- @return Lazy?
function M.bootstrap()
--- @type { fs_stat: fun(path: string): boolean }
local fs = vim.uv or vim.loop
if fs.fs_stat(lazypath) then
vim.opt.rtp:prepend(lazypath)
return require('lazy')
end
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
{ out, 'WarningMsg' },
}, true, {})
return nil
end
return require('lazy')
end
return M