# HG changeset patch # User Bram Moolenaar # Date 1599059703 -7200 # Node ID cdf95988615afac2020d9fa793c6c502e62899f3 # Parent 089b4044883f1f7ce7f3409c5f94bc9380902b76 patch 8.2.1566: not all Bazel files are recognized Commit: https://github.com/vim/vim/commit/4488f5a545691ca4c8802bad0d70a5e750fc8844 Author: Bram Moolenaar Date: Wed Sep 2 17:08:59 2020 +0200 patch 8.2.1566: not all Bazel files are recognized Problem: Not all Bazel files are recognized. Solution: Add *.bazel and *.BUILD. (closes https://github.com/vim/vim/issues/6836) diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -240,10 +240,10 @@ au BufNewFile,BufRead */etc/blkid.tab,*/ au BufNewFile,BufRead *bsd,*.bsdl setf bsdl " Bazel (http://bazel.io) -autocmd BufRead,BufNewFile *.bzl,WORKSPACE,BUILD.bazel setf bzl +autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl if has("fname_case") " There is another check for BUILD further below. - autocmd BufRead,BufNewFile BUILD setf bzl + autocmd BufRead,BufNewFile *.BUILD,BUILD setf bzl endif " C or lpc @@ -2042,7 +2042,7 @@ au BufNewFile,BufRead bzr_log.* setf b " Bazel build file if !has("fname_case") - au BufNewFile,BufRead BUILD setf bzl + au BufNewFile,BufRead *.BUILD,BUILD setf bzl endif " BIND zone diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -75,6 +75,7 @@ let s:filename_checks = { \ 'ave': ['file.ave'], \ 'awk': ['file.awk', 'file.gawk'], \ 'b': ['file.mch', 'file.ref', 'file.imp'], + \ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'], \ 'bc': ['file.bc'], \ 'bdf': ['file.bdf'], \ 'bib': ['file.bib'], @@ -527,6 +528,7 @@ let s:filename_checks = { let s:filename_case_checks = { \ 'modula2': ['file.DEF', 'file.MOD'], + \ 'bzl': ['file.BUILD', 'BUILD'], \ } func CheckItems(checks) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1566, +/**/ 1565, /**/ 1564,