Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions doc/vimtex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5598,6 +5598,7 @@ Contents:
* |vimtex-faq-texmfhome|
* |vimtex-faq-wsl|
* |vimtex-faq-zathura-macos|
* |vimtex-faq-treesitter|

------------------------------------------------------------------------------
*vimtex-faq-windows*
Expand Down Expand Up @@ -5890,8 +5891,29 @@ A: VimTeX implements a traditional syntax script for syntax highlighting of
let g:vimtex_syntax_enabled = 0
let g:vimtex_syntax_conceal_disable = 1
<
Q: How to use Vimtex with markdown plugins that needs treesitter enabled?
A: If one wants to use plugins alongside Vimtex in a markdown document that
requires treesitter highlighting to be enabled one can do: >

require 'nvim-treesitter.configs'.setup {
ensure_installed = { "markdown" },
highlight = {
enable = true,
disable = { "latex" },
additional_vim_regex_highlighting = { "latex", "markdown" },
},
--other treesitter settings
}
<
Be warned though that this does not disable the legacy syntax engine when
attaching a treesitter parser (via syntax off), i.e., it runs both
treesitter and regex highlighting in parallel (completely negating any
performance benefit, and possibly can lead to weird results since both
types of highlighting are applied, one over the other).

[0]: https://tree-sitter.github.io/tree-sitter/
[1]: https://github.com/nvim-treesitter/nvim-treesitter
[2]: https://github.com/nvim-treesitter/nvim-treesitter#available-modules

==============================================================================
TROUBLESHOOTING *vimtex-troubleshooting*
Expand Down