]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0201: filetype: Wireguard config files not recognized v9.2.0201
authorFurkan Sahin <furkan-dev@proton.me>
Thu, 19 Mar 2026 19:28:39 +0000 (19:28 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 19 Mar 2026 19:28:39 +0000 (19:28 +0000)
Problem:  filetype: Wireguard config files not recognized
Solution: Detect /etc/wireguard/*.conf files as dosini filetype
          (Furkan Sahin).

closes: #19751

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 3031afdd66e9c00b3f567225d9253d4e26a85c84..6252563dc9e9ae67d6254eb20a6fee02ba21c11e 100644 (file)
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:          The Vim Project <https://github.com/vim/vim>
-" Last Change:         2026 Feb 18
+" Last Change:         2026 Mar 19
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " If the filetype can be detected from extension or file name(the final path component),
@@ -1571,6 +1571,9 @@ au BufNewFile,BufRead *vimrc*                     call s:StarSetf('vim')
 " Subversion commit file
 au BufNewFile,BufRead svn-commit*.tmp          setf svn
 
+" Wireguard config
+au BufNewFile,BufRead */etc/wireguard/*.conf    setf dosini
+
 " X resources file
 au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults')
 
index 125833cb93bb175f236cb7f96752ebd96a019926..735b5812417f3989c7f32a855bbd92273f8baca8 100644 (file)
@@ -256,6 +256,7 @@ def s:GetFilenameChecks(): dict<list<string>>
              'psprint.conf', 'sofficerc', 'any/.config/lxqt/globalkeyshortcuts.conf', 'any/.config/screengrab/screengrab.conf',
              'any/.local/share/flatpak/repo/config',
              '.alsoftrc', 'alsoft.conf', 'alsoft.ini', 'alsoftrc.sample',
+             '/etc/wireguard/wg0.conf',
              '.notmuch-config', '.notmuch-config.myprofile',
              '~/.config/notmuch/myprofile/config'] + WhenConfigHome('$XDG_CONFIG_HOME/notmuch/myprofile/config'),
     dot: ['file.dot', 'file.gv'],
index b1088289fb1c25d998634dfff7475fd51659f127..f4d0d87aee7262449e9f9528076f29f7fe0a12bb 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    201,
 /**/
     200,
 /**/