Skip to content

Commit c59a864

Browse files
Freed-Wuchrisbra
authored andcommitted
patch 9.1.0324: filetype: some json files are not recognized
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>
1 parent 8a31de6 commit c59a864

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

runtime/filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc setf json
11681168

11691169
" JSONC (JSON with comments)
11701170
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
1171-
au BufNewFile,BufRead .jshintrc,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
1171+
au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
11721172

11731173
" JSON
11741174
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json

src/testdir/test_filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def s:GetFilenameChecks(): dict<list<string>>
362362
jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
363363
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'],
364364
json5: ['file.json5'],
365-
jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
365+
jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
366366
jsonl: ['file.jsonl'],
367367
jsonnet: ['file.jsonnet', 'file.libsonnet'],
368368
jsp: ['file.jsp'],

src/version.c

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

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
324,
707709
/**/
708710
323,
709711
/**/

0 commit comments

Comments
 (0)