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:
inkch
2025-07-23 19:57:27 +09:00
parent d3e9f68879
commit df7e2468b8

View File

@@ -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] ]])