Skip to content

Commit

Permalink
feat: recognize geojson extension as json filetype (#12636)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpelle committed Aug 9, 2023
1 parent b69b9d5 commit 077ade4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/testdir/test_filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 077ade4

Please sign in to comment.