From eb7e7ad882aedc2204a46289f4b66996e835697b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 26 Jun 2021 11:37:43 -0400 Subject: [PATCH] vim-patch:8.2.3049: JSON patch file not recognized Problem: JSON patch file not recognized. Solution: Recognize json-patch as json. (Kevin Locke, closes vim/vim#8450) https://github.com/vim/vim/commit/6582e230a0f6592287b1123c5fc3807d6fed997e --- runtime/filetype.vim | 3 +++ src/nvim/testdir/test_filetype.vim | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index d449edfd02..b3bc282c89 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -858,6 +858,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json +" JSON Patch (RFC 6902) +au BufNewFile,BufRead *.json-patch setf json + " Jupyter Notebook is also json au BufNewFile,BufRead *.ipynb setf json diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 202177053a..f10d2b6159 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -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.webmanifest', 'Pipfile.lock', 'file.ipynb'], + \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb'], \ 'jsp': ['file.jsp'], \ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'], \ 'kivy': ['file.kv'],