vim-patch:9.2.0786: filetype: Containerfile is not recognized (#40807)

Problem:  filetype: Containerfile is not recognized
Solution: Detect *.[Cc]ontainerfiles as dockerfile filetype
          (Omer Tuchfeld)

closes: vim/vim#20783

Supported by AI.

6b62ae68c6

Co-authored-by: Omer Tuchfeld <omer@tuchfeld.dev>
This commit is contained in:
zeertzjq
2026-07-18 17:59:52 +08:00
committed by GitHub
parent 5e2ad295c0
commit 1520a4e3e6
2 changed files with 3 additions and 1 deletions

View File

@@ -444,6 +444,8 @@ local extension = {
rej = 'diff',
dj = 'djot',
djot = 'djot',
Containerfile = 'dockerfile',
containerfile = 'dockerfile',
Dockerfile = 'dockerfile',
dockerfile = 'dockerfile',
bat = 'dosbatch',

View File

@@ -246,7 +246,7 @@ func s:GetFilenameChecks() abort
\ 'dircolors': ['.dir_colors', '.dircolors', '/etc/DIR_COLORS', 'any/etc/DIR_COLORS'],
\ 'djot': ['file.dj', 'file.djot'],
\ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
\ 'dockerfile': ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
\ 'dockerfile': ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'file.Containerfile', 'file.containerfile', 'Dockerfile.debian', 'Containerfile.something'],
\ 'dosbatch': ['file.bat'],
\ 'dosini': ['/etc/yum.conf', '/etc/nfs.conf', '/etc/nfsmount.conf', 'file.ini',
\ 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', 'php-fpm.conf', 'php-fpm.conf.default', 'www.conf', 'www.conf.default',