diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-10-11 08:31:06 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-10-11 08:59:37 +0200 |
commit | 79c036747a6cde1e38adcd19ed89b9295b2af1e3 (patch) | |
tree | b859dc59c4810e5183efec84869ca2ec8abe572c | |
parent | a0e3fe57417f0b7c8de60dcebe44d0cf034c4b9a (diff) | |
download | rneovim-79c036747a6cde1e38adcd19ed89b9295b2af1e3.tar.gz rneovim-79c036747a6cde1e38adcd19ed89b9295b2af1e3.tar.bz2 rneovim-79c036747a6cde1e38adcd19ed89b9295b2af1e3.zip |
vim-patch:9.1.0773: filetype: some Apache files are not recognized
Problem: filetype: some Apache files are not recognized
Solution: Detect more config files from the Apache source
distribution as filetype apache (nisbet-hubbard)
closes: vim/vim#15810
https://github.com/vim/vim/commit/e58e9015cc431b79d88af4daec838519a8e296d6
Co-authored-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
-rw-r--r-- | runtime/lua/vim/filetype.lua | 2 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 3d3b2a2ea1..445281deca 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -2185,6 +2185,8 @@ local pattern = { ['^apache%.conf'] = detect_apache_dotconf, ['^apache2%.conf'] = detect_apache_dotconf, ['^httpd%.conf'] = detect_apache_dotconf, + ['^httpd%-.*%.conf'] = detect_apache_dotconf, + ['^proxy%-html%.conf'] = detect_apache_dotconf, ['^srm%.conf'] = detect_apache_dotconf, ['asterisk/.*%.conf'] = starsetf('asterisk'), ['asterisk.*/.*voicemail%.conf'] = starsetf('asteriskvm'), diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 9c0b22f34a..9ae0289030 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -97,8 +97,17 @@ func s:GetFilenameChecks() abort \ 'ampl': ['file.run'], \ 'ant': ['build.xml'], \ 'antlr4': ['parser.g4'], - \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file', '/etc/httpd/mods-some/file', '/etc/httpd/sites-some/file', '/etc/httpd/conf.file/conf'], - \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'], + \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', + \ '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', + \ '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', + \ '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', + \ 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', + \ 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', + \ 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'httpd-some.conf', + \ 'httpd-some.conf-file', 'srm.conf', 'srm.conf-file', 'proxy-html.conf', 'proxy-html.conf-file', '/etc/httpd/mods-some/file', + \ '/etc/httpd/sites-some/file', '/etc/httpd/conf.file/conf'], + \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', + \ 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'], \ 'applescript': ['file.scpt'], \ 'aptconf': ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'], \ 'arch': ['.arch-inventory', '=tagging-method'], |