Skip to content

v0.3.2

Choose a tag to compare

@mmcky mmcky released this 07 Nov 02:12
· 26 commits to main since this release

v0.3.2 - Hotfix: Correct LaTeX Parser Usage

What's Fixed

Critical Bug Fix: v0.3.1 used the wrong parser (markdown_inline) which didn't provide proper LaTeX highlighting.

Root Cause

Investigation using :Inspect revealed:

  • $$ blocks in markdown automatically use the latex parser from nvim-treesitter
  • {math} directives in v0.3.1 used markdown_inline parser (wrong!)
  • This caused different highlighting colors for identical LaTeX equations

The Fix

{math} directives now correctly use the latex parser to match $$ block behavior:

Before (v0.3.1):

  • $$\mathbf{x}$$ → Green LaTeX highlighting ✅
  • {math} \mathbf{x} → Plain markdown text ❌

After (v0.3.2):

  • $$\mathbf{x}$$ → Green LaTeX highlighting ✅
  • {math} \mathbf{x} → Green LaTeX highlighting ✅

Testing

After updating, please:

  1. Run :Lazy sync in Neovim
  2. Clear tree-sitter cache: rm -rf ~/.cache/nvim/
  3. Restart Neovim
  4. Both {math} and $$ should now show identical green LaTeX command highlighting

Technical Details

  • Changed injection query: markdown_inline → latex parser
  • Both formats now use language: latex with @function.latex captures
  • LaTeX commands like \mathbf, \begin{bmatrix}, \vdots, etc. now consistently highlighted in green

Thanks to :Inspect tool for helping diagnose the parser mismatch!