feat(nvim): do not install missing plugins in headless mode

This commit is contained in:
yeti 2025-05-14 10:03:27 +01:00
parent 2fc9551b25
commit 7f2534a1fd

View File

@ -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