changeset 25096:d0625ed91013 v8.2.3085

patch 8.2.3085: JSONC files are not recognized Commit: https://github.com/vim/vim/commit/acbb4b5720fc27b8b07357b763ed4e5a944ae1da Author: Izhak Jakov <izhakjakov> Date: Sat Jul 3 13:09:37 2021 +0200 patch 8.2.3085: JSONC files are not recognized Problem: JSONC files are not recognized. Solution: Recognize .jsonc files. (Izhak Jakov, closes https://github.com/vim/vim/issues/8500)
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Jul 2021 13:15:03 +0200
parents 8b7f6f698a07
children 0a54fef1a914
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -868,6 +868,9 @@ au BufNewFile,BufRead *.json-patch			set
 " Jupyter Notebook is also json
 au BufNewFile,BufRead *.ipynb				setf json
 
+" JSONC
+au BufNewFile,BufRead *.jsonc			setf jsonc
+
 " Kixtart
 au BufNewFile,BufRead *.kix			setf kix
 
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -260,6 +260,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'],
+    \ 'jsonc': ['file.jsonc'],
     \ 'jsp': ['file.jsp'],
     \ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
     \ 'kivy': ['file.kv'],
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3085,
+/**/
     3084,
 /**/
     3083,