File tree 2 files changed +31
-6
lines changed
2 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,39 @@ local M = {}
3
3
M .check = function ()
4
4
vim .health .start (" debugprint.nvim report" )
5
5
6
- local global_opts = require (" debugprint" ).get_global_opts ()
6
+ local global_opts = require (" debugprint" )._get_global_opts ()
7
7
8
8
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 ))
12
35
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
+ )
14
39
end
15
40
end
16
41
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ M.setup = function(opts)
433
433
end
434
434
435
435
--- @return DebugprintGlobalOptions
436
- M .get_global_opts = function ()
436
+ M ._get_global_opts = function ()
437
437
return global_opts
438
438
end
439
439
You can’t perform that action at this time.
0 commit comments