From 7f2534a1fd468044c13fe857b7bdb61e79347658 Mon Sep 17 00:00:00 2001 From: yeti Date: Wed, 14 May 2025 10:03:27 +0100 Subject: [PATCH] feat(nvim): do not install missing plugins in headless mode --- home/.config/nvim/lua/config/lazy.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/.config/nvim/lua/config/lazy.lua b/home/.config/nvim/lua/config/lazy.lua index 89871d2..189df3b 100644 --- a/home/.config/nvim/lua/config/lazy.lua +++ b/home/.config/nvim/lua/config/lazy.lua @@ -1,3 +1,4 @@ +local is_headless = #vim.api.nvim_list_uis() == 0 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" @@ -30,7 +31,7 @@ require("lazy").setup({ version = false, -- always use the latest git commit -- version = "*", -- try installing the latest stable version for plugins that support semver }, - install = { missing = true, colorscheme = { "tokyonight", "habamax" } }, + install = { missing = not is_headless, colorscheme = { "tokyonight", "habamax" } }, checker = { enabled = false, -- check for plugin updates periodically notify = false, -- notify on update