aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2021-12-14 14:01:37 +0100
committerGitHub <noreply@github.com>2021-12-14 14:01:37 +0100
commitcc4c8e7af6cce6d9641da8db04e2071adb4c285c (patch)
tree10dae0b090a1f677aa365e1ebe735afe5603e23a
parentf37c5f180a12d0f3a36a8f10ca6719c6f1eb0d49 (diff)
downloadrneovim-cc4c8e7af6cce6d9641da8db04e2071adb4c285c.tar.gz
rneovim-cc4c8e7af6cce6d9641da8db04e2071adb4c285c.tar.bz2
rneovim-cc4c8e7af6cce6d9641da8db04e2071adb4c285c.zip
vim-patch:8.2.3805: i3config files are not recognized (#16645)
Problem: i3config files are not recognized. Solution: Add patterns to match i3config files. (Quentin Hibon, closes vim/vim#7969) https://github.com/vim/vim/commit/8176be159859deb9cf6455565bd7b24b3dcf17b9
-rw-r--r--runtime/filetype.vim4
-rw-r--r--src/nvim/testdir/test_filetype.vim1
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 3e57ae7f0f..b93263eb6d 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -786,6 +786,10 @@ 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
+
" Icon
au BufNewFile,BufRead *.icn setf icon
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index 31052ce47d..5d77db6c21 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -226,6 +226,7 @@ let s:filename_checks = {
\ 'hollywood': ['file.hws'],
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
+ \ 'i3config': ['/home/user/.i3/config', '/home/user/.config/i3/config', '/etc/i3/config', '/etc/xdg/i3/config'],
\ 'logcheck': ['/etc/logcheck/file.d-some/file', '/etc/logcheck/file.d/file', 'any/etc/logcheck/file.d-some/file', 'any/etc/logcheck/file.d/file'],
\ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'],
\ 'natural': ['file.NSA', 'file.NSC', 'file.NSG', 'file.NSL', 'file.NSM', 'file.NSN', 'file.NSP', 'file.NSS'],