@@ -3,9 +3,14 @@ local state = require('render-markdown.state')
3
3
--- @class render.md.Health
4
4
local M = {}
5
5
6
+ --- @private
7
+ --- @type string
8
+ M .version = ' 5.1.0'
9
+
6
10
function M .check ()
7
- vim .health .start (' markdown.nvim [neovim version]' )
8
- M .version (' 0.9' , ' 0.10' )
11
+ vim .health .start (' markdown.nvim [version]' )
12
+ vim .health .ok (' plugin ' .. M .version )
13
+ M .neovim (' 0.9' , ' 0.10' )
9
14
10
15
vim .health .start (' markdown.nvim [configuration]' )
11
16
local errors = state .validate ()
@@ -53,18 +58,20 @@ function M.check()
53
58
end
54
59
end
55
60
61
+ --- @private
56
62
--- @param minimum string
57
63
--- @param recommended string
58
- function M .version (minimum , recommended )
64
+ function M .neovim (minimum , recommended )
59
65
if vim .fn .has (' nvim-' .. minimum ) == 0 then
60
- vim .health .error (' Version < ' .. minimum )
66
+ vim .health .error (' neovim < ' .. minimum )
61
67
elseif vim .fn .has (' nvim-' .. recommended ) == 0 then
62
- vim .health .warn (' Version < ' .. recommended .. ' some features will not work' )
68
+ vim .health .warn (' neovim < ' .. recommended .. ' some features will not work' )
63
69
else
64
- vim .health .ok (' Version >= ' .. recommended )
70
+ vim .health .ok (' neovim >= ' .. recommended )
65
71
end
66
72
end
67
73
74
+ --- @private
68
75
--- @param language string
69
76
--- @param advice ? string
70
77
function M .check_parser (language , advice )
@@ -78,6 +85,7 @@ function M.check_parser(language, advice)
78
85
end
79
86
end
80
87
88
+ --- @private
81
89
--- @param language string
82
90
function M .check_highlight (language )
83
91
local configs = require (' nvim-treesitter.configs' )
@@ -88,6 +96,7 @@ function M.check_highlight(language)
88
96
end
89
97
end
90
98
99
+ --- @private
91
100
--- @param name string
92
101
--- @param advice ? string
93
102
function M .check_executable (name , advice )
@@ -100,6 +109,7 @@ function M.check_executable(name, advice)
100
109
end
101
110
end
102
111
112
+ --- @private
103
113
--- @param name string
104
114
--- @param advice ? string[]
105
115
function M .check_plugin (name , advice )
0 commit comments