I'm having an issue with spell highlighting in my neovim configuration. I'd like spellchecking to be enabled and syntax highlighting to be off when I'm editing markdown and text files, and I can get it to work manually. However, when I try to automate this using ftplugin, the changes don't apply.
In my init.vim, I have
syntax on
Opening any file has intended behavior, syntax highlighting is on.
In ftplugin/markdown.vim, I have:
setlocal formatoptions=1
setlocal linebreak
setlocal spell spelllang=en
setlocal statusline+=\ w:%{WordCount()},
setlocal syntax=off
All other options apply as intended except for syntax options. I know this isn't an issue with spellchecking not working, as I can still see the SpellBad highlighting when setting manually.
Setting setlocal syntax=off manually works fine, I'm just stumped as to why it doesn't apply inside the ftplugin. Any ideas?
system information:
- nvim v0.4.3
- Zorin OS 16