Skip to content

Commit

Permalink
fix(ft detect): Use setlocal ft= instead of setfiletype
Browse files Browse the repository at this point in the history
  • Loading branch information
alker0 committed Feb 5, 2023
1 parent 78e6c65 commit a7b7e97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/chezmoi/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function! chezmoi#filetype#handle_chezmoi_filetype() abort
endif
elseif original_abs_path =~# s:special_path_patterns['ignore_remove']
let b:chezmoi_target_path = original_abs_path
setfiletype conf.chezmoitmpl
setlocal filetype=conf.chezmoitmpl
return
elseif original_abs_path =~# s:special_path_patterns['templates']
call s:disable_artifacts()
Expand Down Expand Up @@ -177,7 +177,7 @@ function! s:enable_template_auto(original_path) abort
let b:chezmoi_original_filetype = &filetype

if empty(b:chezmoi_original_filetype) || b:chezmoi_original_filetype ==# 'chezmoitmpl'
setfiletype chezmoitmpl
setlocal filetype=chezmoitmpl
else
if exists('b:current_syntax')
let b:chezmoi_original_syntax = b:current_syntax
Expand Down

0 comments on commit a7b7e97

Please sign in to comment.