neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 06df3376170f407b40af8b73b872da7b0f2a98f0
parent 8fc1db043a5058bae784c7fa550f0a2d5bd91d2e
Author: Volodymyr Chernetskyi <volodymyr_chernetskyi@goodyear.com>
Date:   Mon,  1 Sep 2025 17:16:43 +0200

vim-patch:9.1.1718: filetype: kubectl config file is not recognized #35583

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: vim/vim#18169

https://github.com/vim/vim/commit/6cd6857cbe671ff8bc4e057b528d37795e1b5c2a
Diffstat:
Mruntime/lua/vim/filetype.lua | 1+
Mtest/old/testdir/test_filetype.vim | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua @@ -2245,6 +2245,7 @@ local pattern = { ['/%.pinforc$'] = 'pinfo', ['/%.cargo/credentials$'] = 'toml', ['/%.init/.*%.override$'] = 'upstart', + ['/%.kube/kuberc$'] = 'yaml', }, ['calendar/'] = { ['/%.calendar/'] = starsetf('calendar'), diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim @@ -928,7 +928,7 @@ func s:GetFilenameChecks() abort \ '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'],