]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1661: BUCK files are not recognized v9.0.1661
authorSon Luong Ngoc <sluongng@gmail.com>
Sat, 24 Jun 2023 16:11:04 +0000 (17:11 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 24 Jun 2023 16:11:04 +0000 (17:11 +0100)
Problem:    BUCK files are not recognized.
Solution:   Recognize BUCK files as "bzl". (Son Luong Ngoc, closes #12564)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index aa33b6529ace5406c8913c1b17ccffc7261a4c04..bead0f31f264e83e9bb1728a239840b1ff85f3df 100644 (file)
@@ -266,11 +266,11 @@ au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old   setf xml
 " BSDL
 au BufNewFile,BufRead *.bsd,*.bsdl                     setf bsdl
 
-" Bazel (http://bazel.io)
+" Bazel (https://bazel.build) and Buck2 (https://buck2.build/)
 autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE,WORKSPACE.bzlmod    setf bzl
 if has("fname_case")
-  " There is another check for BUILD further below.
-  autocmd BufRead,BufNewFile *.BUILD,BUILD             setf bzl
+  " There is another check for BUILD and BUCK further below.
+  autocmd BufRead,BufNewFile *.BUILD,BUILD,BUCK                setf bzl
 endif
 
 " Busted (Lua unit testing framework - configuration files)
@@ -2605,9 +2605,9 @@ au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm')
 " Bazaar version control
 au BufNewFile,BufRead bzr_log.*                        setf bzr
 
-" Bazel build file
+" Bazel and Buck2 build file
 if !has("fname_case")
-  au BufNewFile,BufRead *.BUILD,BUILD          setf bzl
+  au BufNewFile,BufRead *.BUILD,BUILD,BUCK     setf bzl
 endif
 
 " BIND zone
index a704fb624a63924f1419916147c0f5b41f16761c..cf74a02552e2a980db84e8622311dca6ba13af39 100644 (file)
@@ -814,7 +814,7 @@ enddef
 def s:GetFilenameCaseChecks(): dict<list<string>>
   return {
     modula2: ['file.DEF'],
-    bzl: ['file.BUILD', 'BUILD'],
+    bzl: ['file.BUILD', 'BUILD', 'BUCK'],
   }
 enddef
 
index ba999074ba697d600483f31ae85fe42cd4e9ea82..437da6577e2d6ff284814eed3d2c0ed6e6806d90 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1661,
 /**/
     1660,
 /**/