#1141374 neovim: no longer loads file from ~/.config/after/syntax/

Package:
neovim
Source:
neovim
Description:
heavily refactored vim fork
Submitter:
Antonio Terceiro
Date:
2026-07-16 22:47:02 UTC
Severity:
normal
#1141374#5
Date:
2026-07-03 15:48:42 UTC
From:
To:
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. I can reproduce
this with an empty user account:
----------------8<----------------8<----------------8<-----------------
$ tree .config/nvim/
.config/nvim/
├── after
│   └── syntax
│       └── markdown.vim
└── init.vim

3 directories, 2 files
$ tail .config/nvim/init.vim .config/nvim/after/syntax/markdown.vim
==> .config/nvim/init.vim <==
syntax on
colorscheme pablo

==> .config/nvim/after/syntax/markdown.vim <==
syntax keyword Error TODO
----------------8<----------------8<----------------8<-----------------

When I open a .md file, and type "TODO", it will not highlight the word.
If I downgrade neovim and neovim-runtime to the previous version
(_0.11.6-1), it works again. It looks like
~/.config/nvim/after/syntax/markdown.vim is not being loaded at all: if
I put an invalid statement, I don't get an error message (which I do
with the previous version).

#1141374#10
Date:
2026-07-04 01:25:02 UTC
From:
To:
This is because nvim is now using treesitter to handle highlighting, by
default. 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.
2. Create an empty ~/.config/nvim/queries/markdown/highlights.scm to
    defer to the Vim syntax highlighting.

Cheers,

#1141374#15
Date:
2026-07-16 22:19:30 UTC
From:
To:
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.

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.

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.

#1141374#20
Date:
2026-07-16 22:44:36 UTC
From:
To:
FWIW, for now I'm working around this with:

autocmd BufReadPost *.md lua vim.treesitter.stop()