commit aafbd442b2f8ed3c03dae418fabfe3df28608e22
parent 430d12a4fdc99a5f593d459994675ac17fc7c89c
Author: Acaibrid <95097635+A-caibird@users.noreply.github.com>
Date: Wed, 19 Mar 2025 07:34:56 +0800
vim-patch:9.1.1220: filetype: uv.lock file not recognized (#32955)
Problem: filetype: uv.lock file not recognized
Solution: detect uv.lock file as toml filetype
(Acaibird)
closes: vim/vim#16924
https://github.com/vim/vim/commit/18a6853a7627de231f0128237665112a0c8aaaf0
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
@@ -1865,11 +1865,12 @@ local filename = {
tidyrc = 'tidy',
['.tidyrc'] = 'tidy',
['.tmux.conf'] = 'tmux',
+ ['Cargo.lock'] = 'toml',
['/.cargo/config'] = 'toml',
+ ['/.cargo/credentials'] = 'toml',
Pipfile = 'toml',
['Gopkg.lock'] = 'toml',
- ['/.cargo/credentials'] = 'toml',
- ['Cargo.lock'] = 'toml',
+ ['uv.lock'] = 'toml',
['.black'] = 'toml',
black = detect_line1('tool%.black', 'toml', nil),
['trustees.conf'] = 'trustees',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
@@ -816,7 +816,7 @@ func s:GetFilenameChecks() abort
\ 'tla': ['file.tla'],
\ 'tli': ['file.tli'],
\ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf', 'tmux.conf.local'],
- \ 'toml': ['file.toml', 'Gopkg.lock', 'Pipfile', '/home/user/.cargo/config', '.black',
+ \ 'toml': ['file.toml', 'uv.lock', 'Gopkg.lock', 'Pipfile', '/home/user/.cargo/config', '.black',
\ 'any/containers/containers.conf', 'any/containers/containers.conf.d/file.conf',
\ 'any/containers/containers.conf.modules/file.conf', 'any/containers/containers.conf.modules/any/file.conf',
\ 'any/containers/registries.conf', 'any/containers/registries.conf.d/file.conf',