Skip to content

Commit

Permalink
feat: detect headless and set interactive=false
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 25, 2022
1 parent 80a2b71 commit bad1b1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/lazy/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bad1b1f

Please sign in to comment.