fix(config): determine headless only during startup. Fixes #1608

This commit is contained in:
Folke Lemaitre 2024-07-04 15:19:41 +02:00
parent 0f2786bcc9
commit 6fdd904ee4
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 1 deletions

View File

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