local M = {} M.check = function() vim.health.start('Wiki Setup') local ok, config = pcall(require, 'muwiki.config') if not ok then vim.health.error('Failed to load muwiki.config module') return end local cfg = config.options if not cfg.dirs or #cfg.dirs == 0 then vim.health.error('No wiki directories configured') vim.health.info('Add to your config: dirs = {{name = "default", path = "~/wiki"}}') else for _, dir in ipairs(cfg.dirs) do local stat = vim.uv.fs_stat(dir.path) if stat and stat.type == 'directory' then vim.health.ok(string.format("Wiki '%s': %s", dir.name, dir.path)) else vim.health.warn(string.format("Wiki '%s': %s (not found)", dir.name, dir.path)) end end end vim.health.start('Treesitter (Required)') local has_ts_parser = pcall(vim.treesitter.get_parser, 0, 'markdown') if has_ts_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 end return M