]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0853: filetype: kubernetes config file not recognized v9.1.0853
authorJonathan Lopez <jonathanglopez@gmail.com>
Mon, 11 Nov 2024 20:03:31 +0000 (21:03 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 11 Nov 2024 20:03:31 +0000 (21:03 +0100)
Problem:  filetype: kubernetes config file not recognized
Solution: detect '/.kube/config' file as yaml filetype
          (Jonathan Lopez)

closes: #11076

Signed-off-by: Jonathan Lopez <jonathanglopez@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 6e9f0b222afc0d02f1251436f135c21a83597ef7..fbccf22991b769ef48667eac9b4abe5d72310976 100644 (file)
@@ -2919,6 +2919,7 @@ au BufNewFile,BufRead *.y                 call dist#ft#FTy()
 
 " Yaml
 au BufNewFile,BufRead *.yaml,*.yml,*.eyaml             setf yaml
+au BufNewFile,BufRead */.kube/config   setf yaml
 
 " Raml
 au BufNewFile,BufRead *.raml                   setf raml
index cca619bfaa47bc657a17a5a53f1ccc22ececa6fa..09fc184ca63a95fe9bf518dc3456a2d9c7c30ef8 100644 (file)
@@ -885,7 +885,8 @@ 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', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock'],
+    yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock',
+           '/home/user/.kube/config'],
     yang: ['file.yang'],
     yuck: ['file.yuck'],
     z8a: ['file.z8a'],
index ceb17ac42f0133b3faee4558f3941044f0eb6fe2..4e5864f09f914e7a146e85c74ad07549b88c3985 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    853,
 /**/
     852,
 /**/