# HG changeset patch # User Bram Moolenaar # Date 1642943703 -3600 # Node ID 234516a43f33866a3c7e971b9084237f08a109d1 # Parent a0b487fd485e386d21149775fc0a63fef6aa93bc patch 8.2.4191: json5 files are not recognized Commit: https://github.com/vim/vim/commit/e15ebeffb35da4bb7d9054358671735ce6988c28 Author: =?UTF-8?q?Dundar=20G=C3=B6c?= Date: Sun Jan 23 13:05:39 2022 +0000 patch 8.2.4191: json5 files are not recognized Problem: json5 files are not recognized. Solution: Add a pattern for json5 files. (closes https://github.com/vim/vim/issues/9601) diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -888,6 +888,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovi " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json +" JSON5 +au BufNewFile,BufRead *.json5 setf json5 + " JSON Patch (RFC 6902) au BufNewFile,BufRead *.json-patch setf json diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -265,6 +265,7 @@ let s:filename_checks = { \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'], \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'], \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.babelrc', '.eslintrc', '.prettierrc', '.firebaserc', 'file.slnf'], + \ 'json5': ['file.json5'], \ 'jsonc': ['file.jsonc'], \ 'jsp': ['file.jsp'], \ 'julia': ['file.jl'], diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4191, +/**/ 4190, /**/ 4189,