]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0323: filetype: buf.lock files are not recognized master v9.2.0323
authorStefan VanBuren <svanburen@buf.build>
Wed, 8 Apr 2026 18:28:08 +0000 (18:28 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 8 Apr 2026 18:30:46 +0000 (18:30 +0000)
Problem:  filetype: buf.lock files are not recognized
Solution: Detect buf.lock files as yaml filetype
          (Stefan VanBuren)

Reference:
https://buf.build/docs/configuration/v2/buf-lock/

closes: #19935

Signed-off-by: Stefan VanBuren <svanburen@buf.build>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index aa36477c1d17b0bf37429d9e3683f004ecbcd6a3..8bfd13da1745410f3394b33169226862f1c06d8b 100644 (file)
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:          The Vim Project <https://github.com/vim/vim>
-" Last Change:         2026 Mar 24
+" Last Change:         2026 Apr 08
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " If the filetype can be detected from extension or file name(the final path component),
@@ -1312,7 +1312,7 @@ au BufNewFile,BufRead *Xmodmap                    setf xmodmap
 au BufNewFile,BufRead *.y                      call dist#ft#FTy()
 
 " Yaml
-au BufNewFile,BufRead */.kube/config,*/.kube/kuberc    setf yaml
+au BufNewFile,BufRead buf.lock,*/.kube/config,*/.kube/kuberc   setf yaml
 
 " yum conf (close enough to dosini)
 au BufNewFile,BufRead */etc/yum.conf           setf dosini
index 6bd96aed3a19bfe00cfd99d721e2baf292932e9c..7a6615531c5244ced025acc7900321a678219c15 100644 (file)
@@ -991,7 +991,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     xslt: ['file.xsl', 'file.xslt'],
     yacc: ['file.yy', 'file.yxx', 'file.y++'],
     yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'file.kyaml', 'file.kyml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock',
-           '/home/user/.kube/config', '/home/user/.kube/kuberc', '.condarc', 'condarc', '.mambarc', 'mambarc', 'pixi.lock'],
+           '/home/user/.kube/config', '/home/user/.kube/kuberc', '.condarc', 'condarc', '.mambarc', 'mambarc', 'pixi.lock', 'buf.lock'],
     yang: ['file.yang'],
     yara: ['file.yara', 'file.yar'],
     yuck: ['file.yuck'],
index f31488e285d44176a628969979874f1012f89110..fbe3e48eba9d41d7ccd512034f3ba1b1953e23a3 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    323,
 /**/
     322,
 /**/