Skip to content

Commit

Permalink
feat: added health check for GUI's with multigrid enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 15, 2022
1 parent c4ba29d commit 0fdedab
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lua/noice/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,26 @@ function M.check(opts)
log.ok("Not running inside **Neovide**")
end

local uis = vim.api.nvim_list_uis()
for _, ui in ipairs(uis) do
local ok = true
for _, ext in ipairs({ "ext_multigrid", "ext_cmdline", "ext_popupmenu", "ext_messages" }) do
if ui[ext] then
ok = false
log.error(
"You're using a GUI that uses " .. ext .. ". Noice can't work when the GUI has " .. ext .. " enabled."
)
end
end
if ok then
if ui.chan == 0 then
log.ok("You're not using a GUI")
else
log.ok("You're using a GUI that should work ok")
end
end
end

if vim.go.lazyredraw then
if not Config.is_running() then
log.warn(
Expand Down

0 comments on commit 0fdedab

Please sign in to comment.