Skip to content

Commit bba532b

Browse files
committed
feat: Check health - look for mini.hipatterns
1 parent e2aefea commit bba532b

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

lua/debugprint/health.lua

+17-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ M.check = function()
88
if global_opts ~= nil then
99
vim.health.ok("debugprint has been setup")
1010

11-
local success, config = pcall(require, "lazy.core.config")
11+
local success_lazyconfig, module_lazyconfig =
12+
pcall(require, "lazy.core.config")
1213

13-
if success then
14-
local plugin = config.spec.plugins["debugprint.nvim"]
14+
if success_lazyconfig then
15+
local plugin = module_lazyconfig.spec.plugins["debugprint.nvim"]
1516

1617
if
1718
plugin
@@ -31,6 +32,19 @@ M.check = function()
3132
end
3233
end
3334

35+
local success_hipatterns, module_hipatterns =
36+
pcall(require, "mini.hipatterns")
37+
38+
if success_hipatterns and module_hipatterns then
39+
vim.health.ok(
40+
"mini.hipatterns is available and lines can be highlighted"
41+
)
42+
else
43+
vim.health.warn(
44+
"mini.hipatterns is not available; lines cannot be highlighted"
45+
)
46+
end
47+
3448
vim.health.info("debugprint opts = " .. vim.inspect(global_opts))
3549
else
3650
vim.health.warn(

0 commit comments

Comments
 (0)