feat: recognize geojson extension as json filetype (#12636)
Commit:
https://github.com/vim/vim/commit/077ade4f67036e652b99f8f858c9ca1c1dd22245
Author: Dominique Pellé <[email protected]>
Date: Wed Aug 9 17:36:40 2023 +0200
feat: recognize geojson extension as json filetype
(https://github.com/vim/vim/issues/12636)
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 4808a56d8..49e602fab 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1060,6 +1060,9 @@ au BufNewFile,BufRead *.json5 setf
json5
" JSON Patch (RFC 6902)
au BufNewFile,BufRead *.json-patch setf json
+" Geojson is also json
+au BufNewFile,BufRead *.geojson setf json
+
" Jupyter Notebook is also json
au BufNewFile,BufRead *.ipynb setf json
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 7125360da..25bfdeb00 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -340,7 +340,7 @@ def s:GetFilenameChecks(): dict<list<string>>
jq: ['file.jq'],
jovial: ['file.jov', 'file.j73', 'file.jovial'],
jproperties: ['file.properties', 'file.properties_xx',
'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
- json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest',
'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc', '.stylelintrc',
'file.slnf'],
+ json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson',
'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc',
'.stylelintrc', 'file.slnf'],
json5: ['file.json5'],
jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc',
'.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json',
'tsconfig-test.json'],
jsonl: ['file.jsonl'],
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1qTlMt-00BqYr-Vn%40256bit.org.