From b1f8bd6c2bc9e5c138544b69ad42bbb3a43ff086 Mon Sep 17 00:00:00 2001 From: Jonas <6gqrbj@posteo.org> Date: Mon, 13 Apr 2026 19:23:37 +0200 Subject: [PATCH] Add automatic syntax highlighting for TopoJSON files (#53546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TopoJSON is an extension of the geospatial data interchange format, GeoJSON. Although it is not as widely popular, it is frequently used in web maps, where its smaller file size is advantageous. More information about TopoJSON can be found here: https://github.com/topojson/topojson-specification This change adds `topojson` as a recognised path suffix, so TopoJSON files automatically open as JSON and get the standard JSON syntax highlighting. This PR is similar to @flother’s PR for GeoJSON: https://github.com/zed-industries/zed/pull/49261 Closes (my own) discussion: https://github.com/zed-industries/zed/discussions/32963 PS: This is my first PR. I'd appreciate any feedback or suggestions for improvement Self-Review Checklist: - [X] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [ ] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Release notes: - Added automatic syntax highlighting for TopoJSON files --- crates/grammars/src/json/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/grammars/src/json/config.toml b/crates/grammars/src/json/config.toml index e2999b2df58cfe2ed648c6c57f6d526dde5599de..4b7f84d6f519e4998d02d2b3f3e86ecb415c4024 100644 --- a/crates/grammars/src/json/config.toml +++ b/crates/grammars/src/json/config.toml @@ -1,6 +1,6 @@ name = "JSON" grammar = "json" -path_suffixes = ["json", "flake.lock", "geojson", "prettierrc", "json.dist"] +path_suffixes = ["json", "flake.lock", "geojson", "topojson", "prettierrc", "json.dist"] line_comments = ["// "] autoclose_before = ",]}" brackets = [