Last active
July 28, 2025 13:47
-
-
Save julienrbrt/bb4a2efa7c076ef63c139b2445ba45cc to your computer and use it in GitHub Desktop.
Revisions
-
julienrbrt renamed this gist
Jul 28, 2025 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
julienrbrt revised this gist
Jul 28, 2025 . 1 changed file with 5 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,12 @@ [ { "label": "JSON-to-Go", "command": "tempfile=$(mktemp --suffix=.go) && node $HOME/tools/scripts/json-to-go.js <<< '$ZED_SELECTED_TEXT' > \"$tempfile\" && zed \"$tempfile\"", "use_new_terminal": false, "allow_concurrent_runs": false, "reveal": "never", "reveal_target": "dock", "hide": "on_success", "shell": "system" } ] -
julienrbrt created this gist
Jul 28, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ # JSON-to-Go Zed Editor This is a Zed Task for [JSON-to-Go](https://github.com/mholt/json-to-go). I was using the [VSCode extension](https://github.com/mp3cko/json-to-go-vsc) prior to moving to Zed. Adding this snippet to your ~/.config/zed/tasks.json plus a shortcut in the ~/.config/zed/keymap.json brings back most of the basic functionalities. Another prerequisite is to have `node` installed and the [`json-to-go.js`](https://raw.githubusercontent.com/mholt/json-to-go/refs/heads/master/json-to-go.js) script placed at the location defined in your `tasks.json` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ [ { "context": "Workspace", "bindings": { "alt-g": ["task::Spawn", { "task_name": "JSON-to-Go" }] } }, ] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ [ { "label": "JSON-to-Go", "command": "node $HOME/tools/scripts/json-to-go.js <<< '$ZED_SELECTED_TEXT'", "use_new_terminal": false, "allow_concurrent_runs": false, "reveal": "never", "reveal_target": "center", "hide": "never", "shell": "system", "show_summary": false, "show_command": false } ]