From bad1b1f87d3a6dc5ae4b5cdcb1eda7dd79b511f1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 25 Nov 2022 22:49:41 +0100 Subject: [PATCH] feat: detect headless and set interactive=false --- lua/lazy/core/config.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index ad4188f..43836d1 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -51,7 +51,10 @@ function M.setup(opts) M.paths.plugins = vim.fn.stdpath("config") .. "/lua/" .. M.options.plugins:gsub("%.", "/") M.paths.main = M.paths.plugins .. (vim.loop.fs_stat(M.paths.plugins .. ".lua") and ".lua" or "/init.lua") - -- vim.fn.mkdir(M.options.package_path, "p") + -- TODO: check what this does inside a GUI. Probably still ok + if #vim.api.nvim_list_uis() == 0 then + M.options.interactive = false + end vim.api.nvim_create_autocmd("User", { pattern = "VeryLazy",