]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0355: filetype: flake.lock files are not recognized v9.1.0355
authorRiley Bruins <ribru17@hotmail.com>
Fri, 19 Apr 2024 13:13:38 +0000 (15:13 +0200)
committerChristian Brabandt <cb@256bit.org>
Fri, 19 Apr 2024 13:13:38 +0000 (15:13 +0200)
Problem:  filetype: flake.lock files are not recognized
Solution: Detect 'flake.lock' as json filetype
          (Riley Bruins)

closes: #14589

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index c7fc331963601677070cc3beb7a1dae31d035dd0..8c7c015ef3f5d7f4d2c9c8d9918a30edad9873b7 100644 (file)
@@ -1167,7 +1167,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     setf json
+au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,flake.lock  setf json
 
 " JSONC (JSON with comments)
 au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc      setf jsonc
index 02a6e2d1c5a8538822be2e5d07dc4688c557e5dc..1d9954d1e617c97906e89118f4d1da7b8c8e33e0 100644 (file)
@@ -361,7 +361,7 @@ 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', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci'],
+    json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.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 23d2c803d4c3c33a10061fd367288b894cad3c16..df4217dbfe5acc0ba73bd930079418fab0664a80 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    355,
 /**/
     354,
 /**/