Skip to content

Commit 4fca92f

Browse files
dietrichmchrisbra
authored andcommitted
patch 9.1.1620: filetype: composer.lock and symfony.lock files not recognized
Problem: filetype: composer.lock and symfony.lock files not recognized Solution: Detect composer.lock and symfony.lock files as json filetype (Dietrich Moerman) closes: #17945 Signed-off-by: Dietrich Moerman <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent b362995 commit 4fca92f

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

runtime/filetype.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim support file to detect file types
22
"
33
" Maintainer: The Vim Project <https://github.com/vim/vim>
4-
" Last Change: 2025 Jun 18
4+
" Last Change: 2025 Aug 10
55
" Former Maintainer: Bram Moolenaar <[email protected]>
66

77
" Listen very carefully, I will say this only once
@@ -1320,7 +1320,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json
13201320
au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
13211321

13221322
" Other files that look like json
1323-
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock,.swcrc setf json
1323+
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock,.swcrc,composer.lock,symfony.lock setf json
13241324

13251325
" JSONC (JSON with comments)
13261326
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc,bun.lock setf jsonc

src/testdir/test_filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def s:GetFilenameChecks(): dict<list<string>>
404404
jq: ['file.jq'],
405405
json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings',
406406
'.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace',
407-
'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock', '.swcrc'],
407+
'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock', '.swcrc', 'composer.lock', 'symfony.lock'],
408408
json5: ['file.json5'],
409409
jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc', 'bun.lock', expand("$HOME/.config/VSCodium/User/settings.json"), '/home/user/.config/waybar/config' ],
410410
jsonl: ['file.jsonl'],

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ static char *(features[]) =
719719

720720
static int included_patches[] =
721721
{ /* Add new patch number below this line */
722+
/**/
723+
1620,
722724
/**/
723725
1619,
724726
/**/

0 commit comments

Comments
 (0)