From cea36120cf175a481abf7628cdc4f51be1ca3594 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 24 Jul 2024 13:35:52 -0500 Subject: [PATCH] update lazy install snippet --- .../nvim/lua/config/lazy.lua | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/home/private_dot_config/nvim/lua/config/lazy.lua b/home/private_dot_config/nvim/lua/config/lazy.lua index ddd2a03..799817f 100644 --- a/home/private_dot_config/nvim/lua/config/lazy.lua +++ b/home/private_dot_config/nvim/lua/config/lazy.lua @@ -1,10 +1,18 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - -- bootstrap lazy.nvim - -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) +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(vim.env.LAZY or lazypath) +vim.opt.rtp:prepend(lazypath) require("lazy").setup({ spec = { @@ -12,7 +20,6 @@ require("lazy").setup({ { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- import/override with your plugins { import = "lazyvim.plugins.extras.ui.edgy" }, - { import = "lazyvim.plugins.extras.lang.tex" }, { import = "lazyvim.plugins.extras.lang.docker" }, -- { import = "lazyvim.plugins.extras.lang.markdown" }, -- { import = "lazyvim.plugins.extras.lsp.none-ls" }, @@ -29,7 +36,10 @@ require("lazy").setup({ -- version = "*", -- try installing the latest stable version for plugins that support semver }, -- install = { colorscheme = { "tokyonight", "habamax" } }, - checker = { enabled = false }, -- automatically check for plugin updates + checker = { + enabled = true, -- check for plugin updates periodically + notify = false, -- notify on update + }, -- automatically check for plugin updates performance = { rtp = { -- disable some rtp plugins