-
Couldn't load subscription status.
- Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
File type resolution for files in the .chezmoitemplates directory does not appear to be working correctly. The file type is resolved as chezmoitmpl without the true file type:
vim .chezmoitemplates/vscode_settings.json
:echo &ft
# Output: chezmoitmplExpected Output: json.chezmoitmpl
Opening files that end in .tmpl appears to always result in the correct file type (e.g., dot_vimrc.tmpl is vim.chezmoitmpl). This is only occurring for files without the .tmpl extension in the .chezmoitemplates directory (.tmpl is not required here).
I see that the docs say this should be working, so perhaps there is something wrong with my setup
Environment:
- Windows 11 25H2 (also occurs in Termux on Android 16)
- Vim v9.1
- vim-plug latest
- chezmoi.vim latest
dot_vimrc.tmpl:
" Install vim-plug if not found
let data_dir = '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
{{- if eq .chezmoi.os "windows" }}
silent execute '!pwsh -Command "& { Invoke-WebRequest -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | New-Item ' . data_dir . '/autoload/plug.vim -Force }"'
{{- else }}
silent execute '!curl -fLo ' . data_dir . '/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
{{- end }}
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" I've tried with and without this
" let g:chezmoi#use_tmp_buffer = 1
call plug#begin(data_dir . '/bundle')
Plug 'alker0/chezmoi.vim'
call plug#end()Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working