Mercurial > vim
changeset 34933:1d6cc394283c v9.1.0324
patch 9.1.0324: filetype: some json files are not recognized
Commit: https://github.com/vim/vim/commit/c59a8648b2d8b3e17f12cd45f74a31b1aa385d2d
Author: Wu, Zhenyu <wuzhenyu@ustc.edu>
Date: Sun Apr 14 20:29:43 2024 +0200
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 14 Apr 2024 20:45:04 +0200 |
parents | 9fdacba9c2ec |
children | 9e7a0095db66 |
files | runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1168,7 +1168,7 @@ au BufNewFile,BufRead .prettierrc,.fireb " 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
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -362,7 +362,7 @@ def s:GetFilenameChecks(): dict<list<str 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'],