feat(health): rearrange vim.ui.img checks #40782

This commit is contained in:
Olivia Kinnear
2026-07-17 06:09:04 -05:00
committed by GitHub
parent d36d05cbd5
commit 58fe621cfc
3 changed files with 23 additions and 26 deletions

View File

@@ -1,24 +0,0 @@
local M = {}
local health = vim.health
function M.check()
health.start('vim.ui.img')
local supported, msg = require('vim.ui.img')._supported()
if supported then
if msg then
health.ok(('Graphics protocol: supported (%s)'):format(msg))
else
health.ok('Graphics protocol: supported')
end
else
health.error('Graphics protocol: not supported by this terminal.')
end
if vim.env.TMUX then
health.warn('tmux is detected. Images may not display correctly.')
end
end
return M