mirror of https://github.com/folke/lazy.nvim.git
feat: detect headless and set interactive=false
This commit is contained in:
parent
80a2b71a09
commit
bad1b1f87d
|
@ -51,7 +51,10 @@ function M.setup(opts)
|
||||||
M.paths.plugins = vim.fn.stdpath("config") .. "/lua/" .. M.options.plugins:gsub("%.", "/")
|
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")
|
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", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "VeryLazy",
|
pattern = "VeryLazy",
|
||||||
|
|
Loading…
Reference in New Issue