Skip to content

Commit

Permalink
Add detection for files in directories .chezmoiexternals and .chezmoi…
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
ryukisec committed Sep 3, 2023
1 parent 902c407 commit 53e9013
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions autoload/chezmoi/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ function! chezmoi#filetype#handle_chezmoi_filetype() abort
elseif original_abs_path =~# s:special_path_patterns['config'] ||
\ original_abs_path =~# s:special_path_patterns['data']
let options.need_name_fix = v:false
elseif original_abs_path =~# s:special_path_patterns['datas']
let options.need_name_fix = v:false
let options.enable_tmpl_force = v:true
elseif original_abs_path =~# s:special_path_patterns['external']
let options.need_name_fix = v:false
let options.enable_tmpl_force = v:true
elseif original_abs_path =~# s:special_path_patterns['externals']
let options.need_name_fix = v:false
let options.enable_tmpl_force = v:true
elseif original_abs_path =~# s:special_path_patterns['external_dir'] ||
\ original_abs_path =~# s:special_path_patterns['other_dot_path']
return
Expand Down Expand Up @@ -130,7 +136,9 @@ function! s:get_special_path_patterns() abort
let patterns.scripts = dir_prefix . '\.chezmoiscripts/.+'
let patterns.scripts_dot = dir_prefix . '\.chezmoiscripts/' . other_dot_pattern
let patterns.data = dir_prefix . '\.chezmoidata' . config_extensions . '$'
let patterns.datas = dir_prefix . '\.chezmoidata/.+'
let patterns.external = dir_prefix . '\.chezmoiexternal' . config_extensions . '%(\.tmpl)?$'
let patterns.externals = dir_prefix . '\.chezmoiexternals/.+'
let patterns.config = dir_prefix . '\.chezmoi' . config_extensions . '\.tmpl$'
" Ignoring below paths should not be a problem:
" .chezmoiversion
Expand Down

0 comments on commit 53e9013

Please sign in to comment.