patch 9.1.1787: filetype: not all Sway config files are recognized

Commit: 
https://github.com/vim/vim/commit/24f0dbba8c19be6969f392f891067ded4233bde7
Author: Felix Pehla <[email protected]>
Date:   Tue Sep 23 20:25:11 2025 +0000

    patch 9.1.1787: filetype: not all Sway config files are recognized
    
    Problem:  filetype: not all Sway config files are recognized
    Solution: Detect files within */sway/config.d/* as swayconfig filetype
              (Felix Pehla).
    
    Sways default config automatically includes files placed in
    @sysconfdir@/sway/config.d/* (see config.in), so it makes sense to use
    the sway syntax for those.
    
    related: #18293
    
    Signed-off-by: Felix Pehla <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 06167c727..ede8dd47b 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1193,6 +1193,7 @@ au BufNewFile,BufRead */.i3/config                setf 
i3config
 
 " sway
 au BufNewFile,BufRead */sway/config            setf swayconfig
+au BufNewFile,BufRead */sway/config.d/*                setf swayconfig
 au BufNewFile,BufRead */.sway/config           setf swayconfig
 
 " Icon
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 5dc91696c..91bdffda5 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -775,7 +775,8 @@ def s:GetFilenameChecks(): dict<list<string>>
     svg: ['file.svg'],
     svn: ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
     sway: ['file.sw'],
-    swayconfig: ['/home/user/.sway/config', '/home/user/.config/sway/config', 
'/etc/sway/config', '/etc/xdg/sway/config'],
+    swayconfig: ['/home/user/.sway/config', '/home/user/.config/sway/config', 
'/etc/sway/config', '/etc/xdg/sway/config',
+                 '/home/user/sway/config.d/50-user.conf' ],
     swift: ['file.swift', 'file.swiftinterface'],
     swiftgyb: ['file.swift.gyb'],
     swig: ['file.swg', 'file.swig'],
diff --git a/src/version.c b/src/version.c
index 4de35bef3..b43aa1328 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1787,
 /**/
     1786,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1v19eF-007IHx-Pm%40256bit.org.

Raspunde prin e-mail lui