changeset 36522:ebd86264d9ee draft v9.1.0853

patch 9.1.0853: filetype: kubernetes config file not recognized Commit: https://github.com/vim/vim/commit/6fbf63de865001dedafc227465e651926cf6f6dc Author: Jonathan Lopez <jonathanglopez@gmail.com> Date: Mon Nov 11 21:03:31 2024 +0100 patch 9.1.0853: filetype: kubernetes config file not recognized 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>
author Christian Brabandt <cb@256bit.org>
date Mon, 11 Nov 2024 21:15:02 +0100
parents 432065c72133
children 6ab62967143b
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -2919,6 +2919,7 @@ au BufNewFile,BufRead *.y			call dist#ft
 
 " Yaml
 au BufNewFile,BufRead *.yaml,*.yml,*.eyaml		setf yaml
+au BufNewFile,BufRead */.kube/config	setf yaml
 
 " Raml
 au BufNewFile,BufRead *.raml			setf raml
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -885,7 +885,8 @@ def s:GetFilenameChecks(): dict<list<str
     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'],
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    853,
+/**/
     852,
 /**/
     851,