fix(nvim): restrict *.tmpl filetype detection to files under */chezmoi/
Limit autocmd pattern to only match *.tmpl files located directly inside a `chezmoi/` directory. This prevents unintended filetype assignments for similarly named files (e.g. Go template)
This commit is contained in:
@@ -1 +1 @@
|
|||||||
vim.cmd([[ autocmd BufNewFile,BufRead *.tmpl execute 'set filetype='..matchlist(expand('<afile>'), '.*\.\(.*\)\.tmpl$')[1] ]])
|
vim.cmd([[ autocmd BufNewFile,BufRead */chezmoi/*.tmpl execute 'set filetype='..matchlist(expand('<afile>'), '.*\.\(.*\)\.tmpl$')[1] ]])
|
||||||
|
Reference in New Issue
Block a user