From 6fdd904ee45b66d933c5d2f72bcec337e13744f8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 4 Jul 2024 15:19:41 +0200 Subject: [PATCH] fix(config): determine headless only during startup. Fixes #1608 --- lua/lazy/core/config.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index b7f5c14..f77a29d 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -253,8 +253,9 @@ M.mapleader = nil ---@type string M.maplocalleader = nil +local headless = #vim.api.nvim_list_uis() == 0 function M.headless() - return #vim.api.nvim_list_uis() == 0 + return headless end ---@param opts? LazyConfig