On Thu, Jul 16, 2026 at 07:19:36PM -0300, Antonio Terceiro wrote: > On Fri, Jul 03, 2026 at 09:25:02PM -0400, James McCoy wrote: > > On Fri, Jul 03, 2026 at 12:48:42PM -0300, Antonio Terceiro wrote: > > > I have a few extra syntax rules for markdown files, that I place in > > > ~/.config/nvim/after/syntax/markdown.vim as documented. After vim 0.12 > > > reached testing and I upgraded, this stopped working. > > > > This is because nvim is now using treesitter to handle highlighting, by > > default. > > This is probably something that should be announced in NEWS.Debian. > Departing from the traditional vim syntax definitions is something that > will break a lot of people's use cases. > > > You have two options. > > > > 1. Create a ~/.config/nvim/queries/markdown/highlights.scm and implement > > the same syntax extentions with treesitter. ":help treesitter-query", > > ":help treesitter-query-modeline-extends", and ":help > > treesitter-highlight" should help with that. > > OK. I understand how this is supposed to work, but could not replicate > my configiration yet. I will try to figure it out at some point, or go > back to good old vim if I get too annoyed. > > > 2. Create an empty ~/.config/nvim/queries/markdown/highlights.scm to > > defer to the Vim syntax highlighting. > > This doesn't work. AIUI, this will override the default treesitter > syntax definition, and I get no syntax highlighting at all. If I put an > invalid treesitter definition in there, *then* I get the original syntax > highlighting, but preceded by a scary error message at startup.
FWIW, for now I'm working around this with: autocmd BufReadPost *.md lua vim.treesitter.stop()
signature.asc
Description: PGP signature

