From 167b84d94a0ea1986ae391ccfba162b382b0d33b Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 7 Sep 2024 22:23:26 -0400 Subject: Future-proof lazy.nvim bootstrap --- lua/core/lazy.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 lua/core/lazy.lua (limited to 'lua/core/lazy.lua') diff --git a/lua/core/lazy.lua b/lua/core/lazy.lua new file mode 100644 index 0000000..364be6f --- /dev/null +++ b/lua/core/lazy.lua @@ -0,0 +1,40 @@ +-- _ +-- | | __ _ _____ _ +-- | | / _` |_ / | | | +-- | |__| (_| |/ /| |_| | +-- |_____\__,_/___|\__, | +-- |___/ +-- +-- Bootstrap lazy.nvim {{{ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + 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" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) +-- }}} +-- Configure Lazy {{{ +require("lazy").setup({ + { import = "plugins" }, -- i.e. the lua/plugins directory + -- add more subdirectories as needed +}, { + install = { colorscheme = { "no-clown-fiesta" } }, +}, { + checker = { + enabled = true, + notify = false, + }, + change_detection = { + notify = false, + }, +}) +-- }}} -- cgit v1.2.3