]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0324: filetype: some json files are not recognized v9.1.0324
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sun, 14 Apr 2024 18:29:43 +0000 (20:29 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 14 Apr 2024 18:29:43 +0000 (20:29 +0200)
Problem:  filetype: some json files are not recognized
Solution: Detect '.jscsrc' and '.vsconfig' as jsonc filetype
          (Wu, Zhenyu)

See:
- https://github.com/microsoft/PowerToys/blob/main/.vsconfig
- https://jscs-dev.github.io/

closes: #14452

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 61f17c458df5dc1c078f77df1dc1d5c334a1a491..9864e06b1ede91a75f67d3ae81154253f45e7202 100644 (file)
@@ -1168,7 +1168,7 @@ au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc        setf json
 
 " JSONC (JSON with comments)
 au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc      setf jsonc
-au BufNewFile,BufRead .jshintrc,.hintrc,.swrc,[jt]sconfig*.json        setf jsonc
+au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json      setf jsonc
 
 " JSON
 au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest     setf json
index 900fc2be6d0bfce709abd06a68b330f921507f7e..07aa6853ec9b5befb3ddabd9368f2cf2c23edd26 100644 (file)
@@ -362,7 +362,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     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'],
     json5: ['file.json5'],
-    jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.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'],
     jsonl: ['file.jsonl'],
     jsonnet: ['file.jsonnet', 'file.libsonnet'],
     jsp: ['file.jsp'],
index 7411921dfeace49a4e169714fafb70075dd294ff..d8e4f2672b937d5d2d6a389a2faa575d6582307a 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    324,
 /**/
     323,
 /**/