@@ -3,9 +3,14 @@ local state = require('render-markdown.state')
33--- @class render.md.Health
44local M = {}
55
6+ --- @private
7+ --- @type string
8+ M .version = ' 5.1.0'
9+
610function 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' )
914
1015 vim .health .start (' markdown.nvim [configuration]' )
1116 local errors = state .validate ()
@@ -53,18 +58,20 @@ function M.check()
5358 end
5459end
5560
61+ --- @private
5662--- @param minimum string
5763--- @param recommended string
58- function M .version (minimum , recommended )
64+ function M .neovim (minimum , recommended )
5965 if vim .fn .has (' nvim-' .. minimum ) == 0 then
60- vim .health .error (' Version < ' .. minimum )
66+ vim .health .error (' neovim < ' .. minimum )
6167 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' )
6369 else
64- vim .health .ok (' Version >= ' .. recommended )
70+ vim .health .ok (' neovim >= ' .. recommended )
6571 end
6672end
6773
74+ --- @private
6875--- @param language string
6976--- @param advice ? string
7077function M .check_parser (language , advice )
@@ -78,6 +85,7 @@ function M.check_parser(language, advice)
7885 end
7986end
8087
88+ --- @private
8189--- @param language string
8290function M .check_highlight (language )
8391 local configs = require (' nvim-treesitter.configs' )
@@ -88,6 +96,7 @@ function M.check_highlight(language)
8896 end
8997end
9098
99+ --- @private
91100--- @param name string
92101--- @param advice ? string
93102function M .check_executable (name , advice )
@@ -100,6 +109,7 @@ function M.check_executable(name, advice)
100109 end
101110end
102111
112+ --- @private
103113--- @param name string
104114--- @param advice ? string[]
105115function M .check_plugin (name , advice )
0 commit comments