Skip to content

Commit

Permalink
feat(special file): Support .tmpl suffix for some
Browse files Browse the repository at this point in the history
If the following have `.tmpl` suffix, highlight in the same way
as not having.
- `.chezmoiignore`
- `.chezmoiremove`
- `.chezmoiexternal.<format>`
  • Loading branch information
alker0 committed Feb 2, 2023
1 parent 4b08797 commit 38575ec
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 @@ -119,12 +119,12 @@ function! s:get_special_path_patterns() abort
let config_extensions = '\.%(json|ya?ml|toml|hcl|plist|properties)'
let other_dot_pattern = '%([^/]+/){-}\.'
let patterns = {}
let patterns.ignore_remove = dir_prefix . '\.chezmoi%(ignore|remove)$'
let patterns.ignore_remove = dir_prefix . '\.chezmoi%(ignore|remove)%(\.tmpl)?$'
let patterns.templates = dir_prefix . '\.chezmoitemplates/.+'
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.external = dir_prefix . '\.chezmoiexternal' . config_extensions . '$'
let patterns.external = dir_prefix . '\.chezmoiexternal' . config_extensions . '%(\.tmpl)?$'
let patterns.config = dir_prefix . '\.chezmoi' . config_extensions . '\.tmpl$'
" Ignoring below paths should not be a problem:
" .chezmoiversion
Expand Down

0 comments on commit 38575ec

Please sign in to comment.