patch 9.2.0323: filetype: buf.lock files are not recognized
Commit:
https://github.com/vim/vim/commit/c2734dc03cd9ee437d25a6940e8c37ac7873b01d
Author: Stefan VanBuren <[email protected]>
Date: Wed Apr 8 18:28:08 2026 +0000
patch 9.2.0323: filetype: buf.lock files are not recognized
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index aa36477c1..8bfd13da1 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -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 <[email protected]>
" 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
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 6bd96aed3..7a6615531 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -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'],
diff --git a/src/version.c b/src/version.c
index f31488e28..fbe3e48eb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 323,
/**/
322,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wAXtf-00ASIP-Md%40256bit.org.