I want to highlight special regions in a special extension .html.specialext, the regions are Lua code in some delimiter, here it's {{ and }}.
Detecting custom filetypes is trivial but here is my code in .vim/syntax/specialext.vim:
if exists("b:current_syntax")
finish
endif
syn clear
set syntax=html
unlet b:current_syntax
syntax include @Lua syntax/lua.vim
syntax region srclua start="{{" end="}}" contains=@Lua
Here is what it does:

The HTML works, but the snippets are broken.
Here is the stock Vim Lua highlighting:

This is not due to spell checking as :set spell and set nospell have no effect
thenandendare caused by spellchecking still being active. See:help :syn-spell. Doesn't account for theif, though.:set nospelland:set spellI determined that this is not due to spellchecking (thanks btw @Friedrich)$ vim --clean?vim --cleanit does not highlight the format, then I:so .vim/syntax/specialext.vimit comes also wrong (even when I copy paste the content) @romainl