]> granicus.if.org Git - vim/commitdiff
patch 8.2.3085: JSONC files are not recognized v8.2.3085
authorIzhak Jakov <izhakjakov>
Sat, 3 Jul 2021 11:09:37 +0000 (13:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Jul 2021 11:09:37 +0000 (13:09 +0200)
Problem:    JSONC files are not recognized.
Solution:   Recognize .jsonc files. (Izhak Jakov, closes #8500)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index e38bc23de0c99d15199d05449738022625619458..952a9a66fa977391e4189a27a20cd66eb337d7b8 100644 (file)
@@ -868,6 +868,9 @@ au BufNewFile,BufRead *.json-patch                  setf json
 " 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
 
index 50293e524db6fd3aef2458450f88bd34163cfe9d..b0eb4aff614833fdbe343320b203be3ad0c9e356 100644 (file)
@@ -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'],
index db88afd8d93ee1c5ee71c7ee965849c6c47634af..70c1b6b97a8293a9b721ef6b52af2483dbff7ae8 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3085,
 /**/
     3084,
 /**/