]> granicus.if.org Git - vim/commitdiff
patch 8.2.3469: some files with json syntax are not recognized v8.2.3469
authorBram Moolenaar <Bram@vim.org>
Sun, 3 Oct 2021 19:11:20 +0000 (20:11 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 3 Oct 2021 19:11:20 +0000 (20:11 +0100)
Problem:    Some files with json syntax are not recognized.
Solution:   Add a few file patterns. (Emiliano Ruiz Carletti, closes #8947)

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

index c81f5a3ef8ac93b5560debf02d01beeadc22af85..960ee39404b120030bd2217bd77e0d7e48224aa8 100644 (file)
@@ -876,6 +876,9 @@ au BufNewFile,BufRead *.json-patch                  setf json
 " Jupyter Notebook is also json
 au BufNewFile,BufRead *.ipynb                          setf json
 
+" Other files that look like json
+au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc  setf json
+
 " JSONC
 au BufNewFile,BufRead *.jsonc                  setf jsonc
 
index 3f4209a7635a1f58a18dfc17670cd5082b6a6a2e..42fe65a9cf94815bd58ca7139f91a5c07927a754 100644 (file)
@@ -259,7 +259,7 @@ let s:filename_checks = {
     \ 'jgraph': ['file.jgr'],
     \ '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'],
+    \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.babelrc', '.eslintrc', '.prettierrc', '.firebaserc'],
     \ 'jsonc': ['file.jsonc'],
     \ 'jsp': ['file.jsp'],
     \ 'julia': ['file.jl'],
index 00ede81abec1cba6b8e3370f0341933d864165a0..d15495ec5d37f685a5b04e5b903aff6404bfbe5d 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3469,
 /**/
     3468,
 /**/