Skip to content

Commit

Permalink
Add filetype detection for eyaml files (#12659)
Browse files Browse the repository at this point in the history
https://github.com/voxpupuli/hiera-eyaml/ uses and produces the eyaml
format, which is simply yaml with some encrypted values.

It's convenient to edit the file without decrypting when not touching
encrypted values (or when you don't have access to the decryption key),
which is why vim should treat those files as yaml files.
  • Loading branch information
VannTen committed Aug 9, 2023
1 parent 958e15b commit b69b9d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2544,7 +2544,7 @@ au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
au BufNewFile,BufRead *.y call dist#ft#FTy()

" Yaml
au BufNewFile,BufRead *.yaml,*.yml setf yaml
au BufNewFile,BufRead *.yaml,*.yml,*.eyaml setf yaml

" Raml
au BufNewFile,BufRead *.raml setf raml
Expand Down
2 changes: 1 addition & 1 deletion src/testdir/test_filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def s:GetFilenameChecks(): dict<list<string>>
xsd: ['file.xsd'],
xslt: ['file.xsl', 'file.xslt'],
yacc: ['file.yy', 'file.yxx', 'file.y++'],
yaml: ['file.yaml', 'file.yml', '.clangd', '.clang-format', '.clang-tidy'],
yaml: ['file.yaml', 'file.yml', 'file.eyaml', '.clangd', '.clang-format', '.clang-tidy'],
yang: ['file.yang'],
yuck: ['file.yuck'],
z8a: ['file.z8a'],
Expand Down

0 comments on commit b69b9d5

Please sign in to comment.