neomutt / neomutt.vim

🔧 vim syntax for neomuttrc
GNU General Public License v2.0
39 stars 7 forks source link

filetype not detected #13

Closed choucavalier closed 1 year ago

choucavalier commented 1 year ago

I have this plugin installed. It correctly detects neomuttrc files most of the time.

However, when I open a file named ~/.config/neomutt/notmuch.neomuttrc it does not detect the filetype correctly. The filetype is NULL.

What could be going wrong?

flatcap commented 1 year ago

The detection is done by the filename. We check for quite a few possible names, but you've picked a form that we missed:

https://github.com/neomutt/neomutt.vim/blob/2d62568159b4c0fcab27cf6badc6c8b70e049600/ftdetect/neomuttrc.vim#L1

I'll add *.neomuttrc to the list, in a second, then you can update your plugin.

If a syntax plugin doesn't recognise your file, you can always configure your vim locally:

autocmd BufNewFile,BufRead *.neomuttrc setfiletype neomuttrc

or manually identify your file with a comment:

# vim: syntax=neomuttrc

(this needs to be in the first few or last few lines) See: :help modeline

choucavalier commented 1 year ago

Thanks! Indeed, I think it would be a nice addition to this plugin.

flatcap commented 1 year ago

Already done :-)