File tree Expand file tree Collapse file tree 2 files changed +31
-6
lines changed
Expand file tree Collapse file tree 2 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,39 @@ local M = {}
33M .check = function ()
44 vim .health .start (" debugprint.nvim report" )
55
6- local global_opts = require (" debugprint" ).get_global_opts ()
6+ local global_opts = require (" debugprint" )._get_global_opts ()
77
88 if global_opts ~= nil then
9- vim .health .ok (
10- " debugprint is started with opts " .. vim .inspect (global_opts )
11- )
9+ vim .health .ok (" debugprint has been setup" )
10+
11+ local success , config = pcall (require , " lazy.core.config" )
12+
13+ if success then
14+ local plugin = config .spec .plugins [" debugprint.nvim" ]
15+
16+ if
17+ plugin
18+ and global_opts .print_tag ~= nil
19+ and global_opts .print_tag ~= " "
20+ then
21+ if plugin .lazy then
22+ vim .health .warn (
23+ " print_tag is set, but plugin is lazy-loaded, this won't highlight the lines correctly"
24+ )
25+ else
26+ vim .health .ok (
27+ " print_tag is set and plugin is not lazy-loaded, "
28+ .. " lines will be highlighted if mini.hipatterns is available"
29+ )
30+ end
31+ end
32+ end
33+
34+ vim .health .info (" debugprint opts = " .. vim .inspect (global_opts ))
1235 else
13- vim .health .warn (" debugprint is not yet started" )
36+ vim .health .warn (
37+ " debugprint is not yet setup, checkhealth cannot fully run"
38+ )
1439 end
1540end
1641
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ M.setup = function(opts)
433433end
434434
435435--- @return DebugprintGlobalOptions
436- M .get_global_opts = function ()
436+ M ._get_global_opts = function ()
437437 return global_opts
438438end
439439
You can’t perform that action at this time.
0 commit comments