From 665a0e85c4788cb2847e270c333c0aee306f07ad Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 22 Dec 2024 15:15:57 +0100 Subject: vim-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. https://github.com/vim/vim/commit/7cb24917a112ba473cb351bdcdc48b8adbd46793 Co-authored-by: Hugo Osvaldo Barrera' via vim_dev --- runtime/lua/vim/filetype.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 31de25a714..6fa1684704 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1439,6 +1439,7 @@ local filename = { ['/etc/asound.conf'] = 'alsaconf', ['build.xml'] = 'ant', ['.htaccess'] = 'apache', + APKBUILD = 'apkbuild', ['apt.conf'] = 'aptconf', ['/.aptitude/config'] = 'aptconf', ['=tagging-method'] = 'arch', @@ -1798,7 +1799,6 @@ local filename = { ['.kshrc'] = detect.ksh, ['.profile'] = detect.sh, ['/etc/profile'] = detect.sh, - APKBUILD = detect.bash, PKGBUILD = detect.bash, ['.tcshrc'] = detect.tcsh, ['tcsh.login'] = detect.tcsh, -- cgit