diff options
author | Christian Clason <c.clason@uni-graz.at> | 2025-02-22 11:01:28 +0100 |
---|---|---|
committer | Christian Clason <ch.clason+github@icloud.com> | 2025-02-23 00:19:53 +0100 |
commit | 010684e0240d86ec88e25dd485b2044297bbf62e (patch) | |
tree | f8ad5f9da5004fb2b0d178ea064755c0a8af3da6 | |
parent | 90958c36483e9a6dc935bb73709fdf888018fe9f (diff) | |
download | rneovim-010684e0240d86ec88e25dd485b2044297bbf62e.tar.gz rneovim-010684e0240d86ec88e25dd485b2044297bbf62e.tar.bz2 rneovim-010684e0240d86ec88e25dd485b2044297bbf62e.zip |
vim-patch:9.1.1133: filetype: xkb files not recognized everywhere
Problem: filetype: xkb files not recognized everywhere
Solution: detect xkb files in more places
(David Mandelberg)
References:
https://xkbcommon.org/doc/current/user-configuration.html#user-config-locations
closes: vim/vim#16684
https://github.com/vim/vim/commit/b62bf814886185cb8607ce15051aa7017b8c88ba
Co-authored-by: David Mandelberg <david@mandelberg.org>
-rw-r--r-- | runtime/lua/vim/filetype.lua | 12 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 6974b6508d..3e6b99435d 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -2150,11 +2150,6 @@ local pattern = { ['/usr/.*/gnupg/options%.skel$'] = 'gpg', ['/usr/share/upstart/.*%.conf$'] = 'upstart', ['/usr/share/upstart/.*%.override$'] = 'upstart', - ['/usr/share/X11/xkb/compat/'] = detect_xkb, - ['/usr/share/X11/xkb/geometry/'] = detect_xkb, - ['/usr/share/X11/xkb/keycodes/'] = detect_xkb, - ['/usr/share/X11/xkb/symbols/'] = detect_xkb, - ['/usr/share/X11/xkb/types/'] = detect_xkb, }, ['/var/'] = { ['/var/backups/group%.bak$'] = 'group', @@ -2329,6 +2324,13 @@ local pattern = { ['^Neomuttrc'] = detect_neomuttrc, ['%.neomuttdebug'] = 'neomuttlog', }, + ['/%.?xkb/'] = { + ['/%.?xkb/compat/'] = detect_xkb, + ['/%.?xkb/geometry/'] = detect_xkb, + ['/%.?xkb/keycodes/'] = detect_xkb, + ['/%.?xkb/symbols/'] = detect_xkb, + ['/%.?xkb/types/'] = detect_xkb, + }, ['^%.'] = { ['^%.cshrc'] = detect.csh, ['^%.login'] = detect.csh, diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 1260f01f8e..8987598e09 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -880,7 +880,8 @@ func s:GetFilenameChecks() abort \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'], \ 'xhtml': ['file.xhtml', 'file.xht'], \ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'], - \ 'xkb': ['/usr/share/X11/xkb/compat/pc', '/usr/share/X11/xkb/geometry/pc', '/usr/share/X11/xkb/keycodes/evdev', '/usr/share/X11/xkb/symbols/pc', '/usr/share/X11/xkb/types/pc'], + \ 'xkb': ['any/xkb/compat/pc', 'any/xkb/geometry/pc', 'any/xkb/keycodes/evdev', 'any/xkb/symbols/pc', 'any/xkb/types/pc', + \ 'any/.xkb/compat/pc', 'any/.xkb/geometry/pc', 'any/.xkb/keycodes/evdev', 'any/.xkb/symbols/pc', 'any/.xkb/types/pc'], \ 'xmath': ['file.msc', 'file.msf'], \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.fsproj', 'file.fsproj.user', 'file.vbproj', 'file.vbproj.user', 'file.ui', \ 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', |