diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-10-04 00:50:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 16:50:51 -0600 |
commit | a0bf28cd54925f1aae522cd2243656bb6162bb57 (patch) | |
tree | 63eb5eca462a7610e79e63109f9b338cdc4e4a6b | |
parent | 7ba11e06c0663ac12f110132d86cd463a7937a57 (diff) | |
download | rneovim-a0bf28cd54925f1aae522cd2243656bb6162bb57.tar.gz rneovim-a0bf28cd54925f1aae522cd2243656bb6162bb57.tar.bz2 rneovim-a0bf28cd54925f1aae522cd2243656bb6162bb57.zip |
vim-patch:8.2.3469: some files with json syntax are not recognized (#15891)
Problem: Some files with json syntax are not recognized.
Solution: Add a few file patterns. (Emiliano Ruiz Carletti, closes vim/vim#8947)
https://github.com/vim/vim/commit/50c56893423eb6ad2154a4151e67f7097f52efb6
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 5e0c6fb32e..322215e1de 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -872,6 +872,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 diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 9eb64f68ef..4a9cb4a8d8 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.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'], |