From 0dbe90b719fa7475b33433c4b6f2313d86eef087 Mon Sep 17 00:00:00 2001 From: moxie Date: Sun, 15 Mar 2026 10:01:57 +0200 Subject: refactor: update treesitter checks and add markdown_inline parser --- lua/muwiki/health.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'lua') 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 -- cgit v1.2.3