]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2042: filetype: systemd quadlet files are not recognized v9.1.2042
authorAc5000 <15003210+Ac5000@users.noreply.github.com>
Fri, 2 Jan 2026 13:58:30 +0000 (13:58 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 2 Jan 2026 13:58:30 +0000 (13:58 +0000)
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 <15003210+Ac5000@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 11491dfc8d1321c59805b57d09d4f320e0929fad..b6e4ac1bcac4607c1fad0582001f76e5d8642a20 100644 (file)
@@ -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 <Bram@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
index 300a7536f87e37d33da7787291605e1c558ccc86..26fb2479903369486a4836730322ffb96e07d47a 100644 (file)
@@ -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'],
index 600fa4c01ee93573da8dcc781609f0f6cb7e100b..e351729773d5a90a8970c02686f8835e4b0a9133 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2042,
 /**/
     2041,
 /**/