]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1718: filetype: kubectl config file is not recognized v9.1.1718
authorVolodymyr Chernetskyi <19735328+chernetskyi@users.noreply.github.com>
Sun, 31 Aug 2025 17:29:01 +0000 (19:29 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 31 Aug 2025 17:31:58 +0000 (19:31 +0200)
Problem:  filetype: kubectl config file is not recognized
Solution: Detect .kube/kubectl as yaml filetype
          (Volodymyr Chernetskyi).

References:
- https://kubernetes.io/docs/reference/kubectl/kuberc/

closes: #18169

Signed-off-by: Volodymyr Chernetskyi <19735328+chernetskyi@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 2e154300e8ade5ebe15f2a8734468ad113117d2e..e1354a503ab3484612fc290f1cd014ea1872207f 100644 (file)
@@ -3064,7 +3064,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
+au BufNewFile,BufRead */.kube/config,*/.kube/kuberc    setf yaml
 
 " Raml
 au BufNewFile,BufRead *.raml                   setf raml
index 2ec3807639db30d392f4df643c0ae577dbedfcd6..829ba8f2ee968e8d7b08a7fbb8fa61a60c5413f8 100644 (file)
@@ -931,7 +931,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     xslt: ['file.xsl', 'file.xslt'],
     yacc: ['file.yy', 'file.yxx', 'file.y++'],
     yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'file.kyaml', 'file.kyml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock',
-           '/home/user/.kube/config', '.condarc', 'condarc', 'pixi.lock'],
+           '/home/user/.kube/config', '/home/user/.kube/kuberc', '.condarc', 'condarc', 'pixi.lock'],
     yang: ['file.yang'],
     yuck: ['file.yuck'],
     z8a: ['file.z8a'],
index 23ea81fdb26a4d4cf2349da5bb24abc859eff661..1ca0bcc281c84c42c3dd254e596bab640f7f4820 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1718,
 /**/
     1717,
 /**/