nvim: add autocmd to guess and set filetype for .tmpl (for chezmoi)

This commit is contained in:
inkch 2024-03-12 12:58:48 +09:00
parent fd3a54ce62
commit 2869e5b244
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
vim.cmd([[ autocmd BufNewFile,BufRead *.tmpl execute 'set filetype='..matchlist(expand('<afile>'), '.*\.\(.*\)\.tmpl$')[1] ]])

View File

@ -1,3 +1,4 @@
require("utils.zenkaku")
require("utils.trim")
require("utils.setindent")
require("utils.chezmoi-tmpl")