diff options
author | Wu, Zhenyu <wuzhenyu@ustc.edu> | 2024-04-14 20:29:43 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-14 20:29:43 +0200 |
commit | c59a8648b2d8b3e17f12cd45f74a31b1aa385d2d (patch) | |
tree | 97ed08586e81f82186be00ec27b41dfb91dd8074 | |
parent | 8a31de6dd275b3dc925fee556ccccd5db8ee2504 (diff) |
patch 9.1.0324: filetype: some json files are not recognizedv9.1.0324
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>
-rw-r--r-- | runtime/filetype.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 61f17c458d..9864e06b1e 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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 diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 900fc2be6d..07aa6853ec 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -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'], diff --git a/src/version.c b/src/version.c index 7411921dfe..d8e4f2672b 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 324, +/**/ 323, /**/ 322, |