]> granicus.if.org Git - vim/commitdiff
patch 8.2.4191: json5 files are not recognized v8.2.4191
author=?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com>
Sun, 23 Jan 2022 13:05:39 +0000 (13:05 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 23 Jan 2022 13:05:39 +0000 (13:05 +0000)
Problem:    json5 files are not recognized.
Solution:   Add a pattern for json5 files. (closes #9601)

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

index 4dc38ed7cabaaf657b898f67370280f5663ce0cd..2c04c00508085e3736785e55fc1ea430db092d13 100644 (file)
@@ -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
 
index d0a1fd23ac92e5d1b69bba30f42342d60cd6c607..c34d4cb930576c937d44c1c2ed9726601bc1484c 100644 (file)
@@ -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'],
index 462ba9fa908f371ccedb0339162f7c123ef115f8..f385750da397f68022a7dea4357911c5df09c938 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4191,
 /**/
     4190,
 /**/