diff options
author | =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com> | 2022-01-23 13:05:39 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-23 13:05:39 +0000 |
commit | e15ebeffb35da4bb7d9054358671735ce6988c28 (patch) | |
tree | eadf46f1b5e55c7742ccec3374d430654805c1ee | |
parent | 206919191fe1881dea00d60d392cc68a07c0106f (diff) | |
download | vim-git-e15ebeffb35da4bb7d9054358671735ce6988c28.tar.gz |
patch 8.2.4191: json5 files are not recognizedv8.2.4191
Problem: json5 files are not recognized.
Solution: Add a pattern for json5 files. (closes #9601)
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 4dc38ed7c..2c04c0050 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -888,6 +888,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial " 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 index d0a1fd23a..c34d4cb93 100644 --- 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 index 462ba9fa9..f385750da 100644 --- 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, |