Commit: patch 9.2.0201: filetype: Wireguard config files not recognized

0 views
Skip to first unread message

Christian Brabandt

unread,
Mar 19, 2026, 3:32:08 PM (4 days ago) Mar 19
to vim...@googlegroups.com
patch 9.2.0201: filetype: Wireguard config files not recognized

Commit: https://github.com/vim/vim/commit/cc8798e71982de485cf00b2630d01285ca045008
Author: Furkan Sahin <furka...@proton.me>
Date: Thu Mar 19 19:28:39 2026 +0000

patch 9.2.0201: filetype: Wireguard config files not recognized

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 <furka...@proton.me>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 3031afdd6..6252563dc 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: 2026 Feb 18
+" Last Change: 2026 Mar 19
" Former Maintainer: Bram Moolenaar <Br...@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')

diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 125833cb9..735b58124 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -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'],
diff --git a/src/version.c b/src/version.c
index b1088289f..f4d0d87ae 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 */
+/**/
+ 201,
/**/
200,
/**/
Reply all
Reply to author
Forward
0 new messages