Skip to content

feat(health): add treesitter markdown parser check#207

Merged
YousefHadder merged 3 commits intomainfrom
feat/treesitter-health-check
Feb 8, 2026
Merged

feat(health): add treesitter markdown parser check#207
YousefHadder merged 3 commits intomainfrom
feat/treesitter-health-check

Conversation

@YousefHadder
Copy link
Copy Markdown
Owner

Add a treesitter markdown parser availability check to :checkhealth markdown-plus.

The format/treesitter.lua module uses treesitter for smart format detection (e.g., detecting bold/italic nodes). If the markdown parser isn't installed, it silently falls back to regex. This health check informs users about the status and suggests installing the parser for improved accuracy.

Copilot AI review requested due to automatic review settings February 8, 2026 18:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Treesitter Markdown parser availability check to the plugin’s :checkhealth markdown-plus diagnostics, helping users understand when markdown-plus can use Treesitter-based “smart” format detection versus regex fallback.

Changes:

  • Add a Treesitter markdown parser check to the health report.
  • Provide an installation suggestion (:TSInstall markdown) when the parser is missing.

Copilot AI review requested due to automatic review settings February 8, 2026 19:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

lua/markdown-plus/health.lua:156

  • Same issue here: :TSInstall markdown may not be available if nvim-treesitter isn’t installed. Suggest gating the hint on the :TSInstall command being present, or using more general wording about installing the markdown Tree-sitter parser.
      health.info(
        "Treesitter markdown parser not available (format detection will use regex fallback)",
        { "Install with :TSInstall markdown for improved format detection accuracy" }
      )

@YousefHadder YousefHadder merged commit 9a75a71 into main Feb 8, 2026
21 checks passed
@YousefHadder YousefHadder deleted the feat/treesitter-health-check branch February 8, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants