Skip to content

Commit

Permalink
patch 8.2.1566: not all Bazel files are recognized
Browse files Browse the repository at this point in the history
Problem:    Not all Bazel files are recognized.
Solution:   Add *.bazel and *.BUILD. (closes vim#6836)
  • Loading branch information
brammool committed Sep 2, 2020
1 parent e90d63e commit 4488f5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
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
Expand Down Expand Up @@ -2042,7 +2042,7 @@ au BufNewFile,BufRead bzr_log.* setf bzr

" Bazel build file
if !has("fname_case")
au BufNewFile,BufRead BUILD setf bzl
au BufNewFile,BufRead *.BUILD,BUILD setf bzl
endif

" BIND zone
Expand Down
2 changes: 2 additions & 0 deletions src/testdir/test_filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1566,
/**/
1565,
/**/
Expand Down

0 comments on commit 4488f5a

Please sign in to comment.