Skip to content
Discussion options

You must be logged in to vote

If you use Treesitter, then VimTeX syntax highlighting is simply not compatible. That is, to my knowledge, you can't use regular built-in (legacy) Vim/Neovim syntax rules in a nested fashion when you use Treesitter for your highlighting.

If you want to use VimTeX for highlighting in Markdown, then you need to use the legacy syntax method for Markdown and specify rules with nested highlighting that includes tex highlighiting. This means you need to avoid enabling Treesitter for Markdown (at least for highlighting).

Exactly how to do it depends on whether you are using a plugin (like vim-markdown) or not. For vim-markdown, you could add after/syntax/tex.vim with something like this:

if exists(

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@lervag
Comment options

@lutalli
Comment options

@lervag
Comment options

@lutalli
Comment options

@lervag
Comment options

Answer selected by lutalli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants