vim-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: vim/vim#18293

24f0dbba8c

Co-authored-by: Felix Pehla <29adc1fd92@gmail.com>
This commit is contained in:
zeertzjq
2025-09-24 08:33:47 +08:00
parent 409122e5ae
commit 0c23b863f4
2 changed files with 3 additions and 1 deletions

View File

@@ -2388,6 +2388,7 @@ local pattern = {
['/%.ssh/config$'] = 'sshconfig',
['/%.sway/config$'] = 'swayconfig',
['/sway/config$'] = 'swayconfig',
['/sway/config%.d/'] = 'swayconfig',
['/%.cargo/config$'] = 'toml',
['/%.bundle/config$'] = 'yaml',
['/%.kube/config$'] = 'yaml',