patch 9.1.0953: filetype: APKBUILD files not correctly detected
Problem: filetype: APKBUILD files not correctly detected
Solution: detect 'APKBUILD' files as apkbuild filetype,
include a apkbuild syntax script (which basically
just sources the sh.vim syntax file)
(Hugo Osvaldo Barrera)
Vim plugins (e.g.: ALE, nvim-lspconfig, etc) rely on filetype to
determine which integrations/helpers are applicable. They expect
filetype=apkbuild for APKBUILD files.
On the other hand, plugins also enable bash-specific linters and
functionality when filetype=bash, but APKBUILD files are POSIX sh, not
bash, so these often provide bogus results.
Change the filetype for APKBUILD to a 'apkbuild', so that tools and
ftplugin can properly target these files. This filetype will use the
existing `sh` syntax rules, since these are applicable for them.
Signed-off-by: Hugo Osvaldo Barrera' via vim_dev <vim_dev@googlegroups.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 4761e71..b5e2dc0 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -107,6 +107,7 @@
'/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'],
+ apkbuild: ['APKBUILD'],
applescript: ['file.scpt'],
aptconf: ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
arch: ['.arch-inventory', '=tagging-method'],
@@ -683,7 +684,7 @@
setserial: ['/etc/serial.conf', 'any/etc/serial.conf'],
sexplib: ['file.sexp'],
sh: ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '.bash_history', '.bash-history',
- '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh',
+ '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh',
'/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats', '.ash_history', 'any/etc/neofetch/config.conf', '.xprofile',
'user-dirs.defaults', 'user-dirs.dirs', 'makepkg.conf', '.makepkg.conf', 'file.mdd', 'file.cygport', '.env', '.envrc', 'devscripts.conf',
'.devscripts', 'file.lo', 'file.la', 'file.lai'],
diff --git a/src/version.c b/src/version.c
index dc7a029..51498fd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 953,
+/**/
952,
/**/
951,