diff options
| author | moxie <moxie@3kgcat.fi> | 2026-03-15 10:01:57 +0200 |
|---|---|---|
| committer | moxie <moxie@3kgcat.fi> | 2026-03-15 10:05:32 +0200 |
| commit | 0dbe90b719fa7475b33433c4b6f2313d86eef087 (patch) | |
| tree | f8729d254c37010a81e308cb255399f0c419b9a6 /lua/muwiki | |
| parent | de2df63dcbe44f07dc994e29d7d400c49c811080 (diff) | |
refactor: update treesitter checks and add markdown_inline parser
Diffstat (limited to 'lua/muwiki')
| -rw-r--r-- | lua/muwiki/health.lua | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lua/muwiki/health.lua b/lua/muwiki/health.lua index 13c5523..fc1c9db 100644 --- a/lua/muwiki/health.lua +++ b/lua/muwiki/health.lua @@ -25,15 +25,23 @@ M.check = function() end end - vim.health.start('Treesitter (Required)') + vim.health.start('Treesitter') - local has_ts_parser = pcall(vim.treesitter.get_parser, 0, 'markdown') - if has_ts_parser then + local has_md_parser = pcall(vim.treesitter.get_parser, 0, 'markdown') + if has_md_parser then vim.health.ok('Treesitter markdown parser is installed') else vim.health.error('Treesitter markdown parser not installed') vim.health.info('Install with: :TSInstall markdown') - vim.health.info('Link detection requires treesitter') + end + + local has_md_inline_parser = pcall(vim.treesitter.get_parser, 0, 'markdown_inline') + if has_md_inline_parser then + vim.health.ok('Treesitter markdown_inline parser is installed') + else + vim.health.error('Treesitter markdown_inline parser not installed') + vim.health.info('Install with: :TSInstall markdown_inline') + vim.health.info('Link detection requires both parsers') end end |
