Commit: patch 9.1.2042: filetype: systemd quadlet files are not recognized

1 view
Skip to first unread message

Christian Brabandt

unread,
Jan 2, 2026, 9:16:03 AM (yesterday) Jan 2
to vim...@googlegroups.com
patch 9.1.2042: filetype: systemd quadlet files are not recognized

Commit: https://github.com/vim/vim/commit/0f93c988e97325bfc54654bc2cf4178fb11ba865
Author: Ac5000 <1500321...@users.noreply.github.com>
Date: Fri Jan 2 13:58:30 2026 +0000

patch 9.1.2042: filetype: systemd quadlet files are not recognized

Problem: filetype: systemd quadlet files are not recognized
Solution: Detect additional patterns as systemd filetype
(Ac5000)

Reference:
- https://docs.podman.io/en/latest/markdown/podman.1.html
- https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
- https://docs.podman.io/en/latest/markdown/podman-quadlet.1.html

fixes: #15078
closes: #19057

Signed-off-by: Ac5000 <1500321...@users.noreply.github.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 11491dfc8..b6e4ac1bc 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2025 Dec 31
+" Last Change: 2026 Jan 02
" Former Maintainer: Bram Moolenaar <Br...@vim.org>

" If the filetype can be detected from extension or file name(the final path component),
@@ -1127,6 +1127,15 @@ au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd
au BufNewFile,BufRead */etc/systemd/system/.#* setf systemd
au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd
au BufNewFile,BufRead */.config/systemd/user/.#* setf systemd
+" Podman Quadlet files
+au BufNewFile,BufRead */containers/systemd/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
+" Podman Quadlet rootless files not already captured by previous line
+au BufNewFile,BufRead */etc/containers/systemd/users/*/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
+au BufNewFile,BufRead */etc/containers/systemd/users/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
+" Podman Quadlet overrides
+au BufNewFile,BufRead */containers/systemd/*.d/*.conf setf systemd
+au BufNewFile,BufRead */etc/containers/systemd/users/*/*.d/*.conf setf systemd
+au BufNewFile,BufRead */etc/containers/systemd/users/*.d/*.conf setf systemd

" Sudoers
au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 300a7536f..26fb24799 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -831,7 +831,34 @@ def s:GetFilenameChecks(): dict<list<string>>
'any/etc/systemd/system/.#', 'any/etc/systemd/system/.#-file',
'any/etc/systemd/system/file.d/.#',
'any/etc/systemd/system/file.d/.#-file',
- 'any/etc/systemd/system/file.d/file.conf'],
+ 'any/etc/systemd/system/file.d/file.conf',
+ 'any/containers/systemd/file.artifact',
+ 'any/containers/systemd/file.build',
+ 'any/containers/systemd/file.container',
+ 'any/containers/systemd/file.image',
+ 'any/containers/systemd/file.kube',
+ 'any/containers/systemd/file.network',
+ 'any/containers/systemd/file.pod',
+ 'any/containers/systemd/file.volume',
+ 'any/containers/systemd/users/any/file.artifact',
+ 'any/containers/systemd/users/any/file.build',
+ 'any/containers/systemd/users/any/file.container',
+ 'any/containers/systemd/users/any/file.image',
+ 'any/containers/systemd/users/any/file.kube',
+ 'any/containers/systemd/users/any/file.network',
+ 'any/containers/systemd/users/any/file.pod',
+ 'any/containers/systemd/users/any/file.volume',
+ 'any/containers/systemd/users/file.artifact',
+ 'any/containers/systemd/users/file.build',
+ 'any/containers/systemd/users/file.container',
+ 'any/containers/systemd/users/file.image',
+ 'any/containers/systemd/users/file.kube',
+ 'any/containers/systemd/users/file.network',
+ 'any/containers/systemd/users/file.pod',
+ 'any/containers/systemd/users/file.volume',
+ 'any/containers/systemd/some.d/file.conf',
+ 'etc/containers/systemd/users/1111/some.d/file.conf',
+ 'etc/containers/systemd/users/some.d/file.conf'],
systemverilog: ['file.sv', 'file.svh'],
tablegen: ['file.td'],
tags: ['tags'],
diff --git a/src/version.c b/src/version.c
index 600fa4c01..e35172977 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2042,
/**/
2041,
/**/
Reply all
Reply to author
Forward
0 new messages