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

6cd6857cbe
This commit is contained in:
Volodymyr Chernetskyi
2025-09-01 17:16:43 +02:00
committed by GitHub
parent 8fc1db043a
commit 06df337617
2 changed files with 2 additions and 1 deletions

View File

@@ -2245,6 +2245,7 @@ local pattern = {
['/%.pinforc$'] = 'pinfo', ['/%.pinforc$'] = 'pinfo',
['/%.cargo/credentials$'] = 'toml', ['/%.cargo/credentials$'] = 'toml',
['/%.init/.*%.override$'] = 'upstart', ['/%.init/.*%.override$'] = 'upstart',
['/%.kube/kuberc$'] = 'yaml',
}, },
['calendar/'] = { ['calendar/'] = {
['/%.calendar/'] = starsetf('calendar'), ['/%.calendar/'] = starsetf('calendar'),

View File

@@ -928,7 +928,7 @@ func s:GetFilenameChecks() abort
\ 'xslt': ['file.xsl', 'file.xslt'], \ 'xslt': ['file.xsl', 'file.xslt'],
\ 'yacc': ['file.yy', 'file.yxx', 'file.y++'], \ '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', \ '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'], \ 'yang': ['file.yang'],
\ 'yuck': ['file.yuck'], \ 'yuck': ['file.yuck'],
\ 'z8a': ['file.z8a'], \ 'z8a': ['file.z8a'],