Skip to content

Commit

Permalink
patch 9.1.0962: filetype: bun.lock file is not recognized
Browse files Browse the repository at this point in the history
Problem:  filetype: bun.lock file is not recognized
Solution: detect 'bun.lock' file as jsonc filetype
          (Anton Kastritskii)

closes: #16308

Signed-off-by: Anton Kastritskii <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
  • Loading branch information
antonk52 authored and chrisbra committed Dec 26, 2024
1 parent 6d2efd4 commit f07ae5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace s
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock setf json

" JSONC (JSON with comments)
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc,bun.lock setf jsonc
au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc

" JSON
Expand Down
2 changes: 1 addition & 1 deletion src/testdir/test_filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def s:GetFilenameChecks(): dict<list<string>>
'.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace',
'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock'],
json5: ['file.json5'],
jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc', 'bun.lock'],
jsonl: ['file.jsonl'],
jsonnet: ['file.jsonnet', 'file.libsonnet'],
jsp: ['file.jsp'],
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
962,
/**/
961,
/**/
Expand Down

0 comments on commit f07ae5b

Please sign in to comment.