Mercurial > vim
changeset 29503:e6e18c0a1694 v9.0.0093
patch 9.0.0093: sway config files are recognized as i3config
Commit: https://github.com/vim/vim/commit/7abd1c6d8e777bde1700633bafc1a40be9e9c1aa
Author: James Eapen <james.eapen@vai.org>
Date: Wed Jul 27 15:07:06 2022 +0100
patch 9.0.0093: sway config files are recognized as i3config
Problem: Sway config files are recognized as i3config.
Solution: Recognize swayconfig separately. (James Eapen, closes https://github.com/vim/vim/issues/10672)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 27 Jul 2022 16:15:03 +0200 |
parents | f4aee5967fc6 |
children | 44ffb6bf2b55 |
files | runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -859,9 +859,13 @@ au BufNewFile,BufRead *.hb setf hb " Httest au BufNewFile,BufRead *.htt,*.htb setf httest -" i3 (and sway) -au BufNewFile,BufRead */i3/config,*/sway/config setf i3config -au BufNewFile,BufRead */.i3/config,*/.sway/config setf i3config +" i3 +au BufNewFile,BufRead */i3/config setf i3config +au BufNewFile,BufRead */.i3/config setf i3config + +" sway +au BufNewFile,BufRead */sway/config setf swayconfig +au BufNewFile,BufRead */.sway/config setf swayconfig " Icon au BufNewFile,BufRead *.icn setf icon
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -535,6 +535,7 @@ let s:filename_checks = { \ 'svelte': ['file.svelte'], \ 'svg': ['file.svg'], \ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'], + \ 'swayconfig': ['/home/user/.sway/config', '/home/user/.config/sway/config', '/etc/sway/config', '/etc/xdg/sway/config'], \ 'swift': ['file.swift'], \ 'swiftgyb': ['file.swift.gyb'], \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'],