rodjek / vim-puppet

Puppet niceties for your Vim setup
Apache License 2.0
502 stars 137 forks source link

epuppet filetype detection does not match subtype via file content header or path in vim #148

Open lelutin opened 3 months ago

lelutin commented 3 months ago

in #146 @shadowwa worked on implementing subtype detection for epuppet so that we can have both syntax and other goodies for the epuppet tags and the underlying text.

However, one of the features was working correctly with neovim, but not with vim: that of reusing the builtin filetype detection in order to match when some parts of the content or the path to the file identify what type of file we're using.

We need to look into uncommenting the tests for those two kinds of filetype detection and then fixing that for vim

Note: the previous attempt by @shadowwa was to call out to doautocmd filetypedetect BufRead + the filename without the .epp extension during the BufRead,BufNewFile autocommand for *.epp. This did not work since the autocmd would call setf something, but that would result in nothing since the filetype was already set to epuppet at that time.