]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
feat: recognize geojson extension as json filetype (#12636)
authorDominique Pellé <dominique.pelle@gmail.com>
Wed, 9 Aug 2023 15:36:40 +0000 (17:36 +0200)
committerGitHub <noreply@github.com>
Wed, 9 Aug 2023 15:36:40 +0000 (17:36 +0200)
runtime/filetype.vim
src/testdir/test_filetype.vim

index 4808a56d8e6d775231d18b0302c2cda1f5968a0d..49e602fab13e235e3b99500bd6b63db2b3f3caea 100644 (file)
@@ -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
 
index 7125360da1d5004199e8abff6dc916351513d012..25bfdeb004d6f1b96f2dd4ea718d30505a9aa1d5 100644 (file)
@@ -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'],