From 5c0ccff78f199c46aea47fa756e7c748477e5c65 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 28 Nov 2021 16:52:56 +0100 Subject: fix: correct order for cmp's setup (#1999) --- lua/lvim/bootstrap.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/lvim/bootstrap.lua') diff --git a/lua/lvim/bootstrap.lua b/lua/lvim/bootstrap.lua index 051f7698..7545b3be 100644 --- a/lua/lvim/bootstrap.lua +++ b/lua/lvim/bootstrap.lua @@ -2,6 +2,7 @@ local M = {} local uv = vim.loop local path_sep = uv.os_uname().version:match "Windows" and "\\" or "/" +local in_headless = #vim.api.nvim_list_uis() == 0 ---Join path segments that were passed as input ---@return string @@ -77,7 +78,7 @@ function M:init(base_dir) vim.fn.mkdir(get_cache_dir(), "p") -- FIXME: currently unreliable in unit-tests - if not os.getenv "LVIM_TEST_ENV" then + if not in_headless then _G.PLENARY_DEBUG = false require("lvim.impatient").setup { path = join_paths(self.cache_dir, "lvim_cache"), -- cgit v1.2.3