]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
Add filetype detection for eyaml files (#12659)
authorMax Gautier <mg@max.gautier.name>
Wed, 9 Aug 2023 15:18:36 +0000 (17:18 +0200)
committerGitHub <noreply@github.com>
Wed, 9 Aug 2023 15:18:36 +0000 (17:18 +0200)
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.

runtime/filetype.vim
src/testdir/test_filetype.vim

index 6d2d55e3c7a91349fccc21add0238dcdb56da64e..4808a56d8e6d775231d18b0302c2cda1f5968a0d 100644 (file)
@@ -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
index a044b629269493a944fa8695630ded05ef7f5fa0..7125360da1d5004199e8abff6dc916351513d012 100644 (file)
@@ -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'],