]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0612: filetype: deno.lock file not recognized v9.1.0612
authorカワリミ人形 <kawarimidoll+git@gmail.com>
Wed, 24 Jul 2024 18:10:58 +0000 (20:10 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 24 Jul 2024 18:10:58 +0000 (20:10 +0200)
Problem:  filetype: deno.lock file not recognized
Solution: detect 'deno.lock' as json filetype
          (カワリミ人形)

Reference:
https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files

closes: #15333

Signed-off-by: カワリミ人形 <kawarimidoll+git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 0ab0f0f17cd3f7cffc868400e4b4be1c9bfde333..b589a0b78194c01f1595373c4622277e08b85559 100644 (file)
@@ -1196,7 +1196,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings       setf json
 au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
 
 " Other files that look like json
-au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock    setf json
+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
index 11e74afce6071a85c7bcc08430fd0b4530079b69..b9291d5978d3d5a09b405e691e339b037e78f934 100644 (file)
@@ -369,7 +369,9 @@ def s:GetFilenameChecks(): dict<list<string>>
     jq: ['file.jq'],
     jovial: ['file.jov', 'file.j73', 'file.jovial'],
     jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
-    json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.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'],
+    json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', 
+    '.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'],
     jsonl: ['file.jsonl'],
index 3963996e77df2546710ec9db93050b0642a5cf97..7cef73c8ba92aefe0dae100d8a0bfae7e4354904 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    612,
 /**/
     611,
 /**/