mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
vim-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: vim/vim#14452
c59a8648b2
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
This commit is contained in:
@@ -1437,10 +1437,12 @@ local filename = {
|
|||||||
['.babelrc'] = 'jsonc',
|
['.babelrc'] = 'jsonc',
|
||||||
['.eslintrc'] = 'jsonc',
|
['.eslintrc'] = 'jsonc',
|
||||||
['.hintrc'] = 'jsonc',
|
['.hintrc'] = 'jsonc',
|
||||||
|
['.jscsrc'] = 'jsonc',
|
||||||
['.jsfmtrc'] = 'jsonc',
|
['.jsfmtrc'] = 'jsonc',
|
||||||
['.jshintrc'] = 'jsonc',
|
['.jshintrc'] = 'jsonc',
|
||||||
['.luaurc'] = 'jsonc',
|
['.luaurc'] = 'jsonc',
|
||||||
['.swrc'] = 'jsonc',
|
['.swrc'] = 'jsonc',
|
||||||
|
['.vsconfig'] = 'jsonc',
|
||||||
['.justfile'] = 'just',
|
['.justfile'] = 'just',
|
||||||
Kconfig = 'kconfig',
|
Kconfig = 'kconfig',
|
||||||
['Kconfig.debug'] = 'kconfig',
|
['Kconfig.debug'] = 'kconfig',
|
||||||
|
@@ -363,7 +363,7 @@ func s:GetFilenameChecks() abort
|
|||||||
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
|
\ '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'],
|
||||||
\ 'json5': ['file.json5'],
|
\ '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'],
|
\ 'jsonl': ['file.jsonl'],
|
||||||
\ 'jsonnet': ['file.jsonnet', 'file.libsonnet'],
|
\ 'jsonnet': ['file.jsonnet', 'file.libsonnet'],
|
||||||
\ 'jsp': ['file.jsp'],
|
\ 'jsp': ['file.jsp'],
|
||||||
|
Reference in New Issue
Block a user