From 7f6f90f249ccc43753058747f6688d4747b982dc Mon Sep 17 00:00:00 2001 From: "david@david-m5" <3200210+davidjenni@users.noreply.github.com> Date: Sat, 6 Jun 2026 22:45:29 -0700 Subject: [PATCH 1/3] feat: zed editor installation and config --- .editorconfig | 3 +- .vscode/settings.json | 1 + bootstrap.ps1 | 5 ++ bootstrap.sh | 6 +++ zed/keymap.json | 61 +++++++++++++++++++++++ zed/settings.json | 112 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 zed/keymap.json create mode 100644 zed/settings.json diff --git a/.editorconfig b/.editorconfig index 499eab0..025d2cb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,6 +13,5 @@ end_of_line = lf [*.{cmd,ps1,csv,doskey}] end_of_line = crlf -[*.{lua,sh,yml}] +[*.{lua,json,sh,yml}] indent_size = 2 - diff --git a/.vscode/settings.json b/.vscode/settings.json index c1e1ab5..8d11998 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -34,6 +34,7 @@ "ilspy", "inputrc", "jorgebucaran", + "keymap", "LASTEXITCODE", "LESSBINFMT", "LESSOPEN", diff --git a/bootstrap.ps1 b/bootstrap.ps1 index 7cffa00..4dd19a4 100644 --- a/bootstrap.ps1 +++ b/bootstrap.ps1 @@ -317,6 +317,7 @@ function installWinGetApps { # per user, no elevation required: & winget install Microsoft.WindowsTerminal --accept-source-agreements --accept-package-agreements --disable-interactivity --silent & winget install Microsoft.VisualStudioCode --accept-source-agreements --accept-package-agreements --disable-interactivity --silent + & winget install ZedIndustries.Zed --accept-source-agreements --accept-package-agreements --disable-interactivity --silent } function setup { @@ -427,6 +428,10 @@ function setupShellEnvs { Remove-Item (Join-Path $sshDir 'config') -ErrorAction SilentlyContinue -Force | Out-Null $openSsh=((Join-Path $env:windir 'System32\OpenSSH\ssh.exe').Replace("\", "/")) & git config --global core.sshCommand $openSsh + + $zedConfigDir = (Join-Path $env:APPDATA 'zed') + copyFile 'zed\settings.json' (Join-Path $zedConfigDir 'settings.json') + copyFile 'zed\keymap.json' (Join-Path $zedConfigDir 'keymap.json') } function main { diff --git a/bootstrap.sh b/bootstrap.sh index d75e871..c6bb886 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -135,6 +135,7 @@ function installApps { tmux tre-command tokei + zed zoxide xz ) @@ -230,6 +231,11 @@ function setupShellEnv { copyFile fish/functions/$f.fish $fishConfigDir/functions/$f.fish done + # zed: + local zedConfigDir=$configDir/zed + copyFile zed/settings.json $zedConfigDir/settings.json + copyFile zed/keymap.json $zedConfigDir/keymap.json + # zsh: local zshConfigDir=$configDir/zsh copyFile zsh/zshenv $zshConfigDir/.zshenv diff --git a/zed/keymap.json b/zed/keymap.json new file mode 100644 index 0000000..3df81b7 --- /dev/null +++ b/zed/keymap.json @@ -0,0 +1,61 @@ +// Zed keymap +// +// For information on binding keys, see the Zed +// documentation: https://zed.dev/docs/key-bindings +// +// To see the default key bindings run `zed: open default keymap` +// from the command palette. +[ + { + "context": "VimControl && !menu", + "bindings": { + "ctrl-\\": "terminal_panel::ToggleFocus", + "space e": "pane::RevealInProjectPanel", + "space f": "file_finder::Toggle", + "space m p": "markdown::OpenPreview", + "space m P": "markdown::OpenPreviewToTheSide", + }, + }, + { + "context": "Editor && vim_mode == insert", + "bindings": { + "j k": "vim::NormalBefore", + }, + }, + { + "context": "Workspace", + "bindings": { + "ctrl-\\": "terminal_panel::ToggleFocus", + "space e": "workspace::ToggleRightDock", + "space g": "git_panel::ToggleFocus", + }, + }, + { + "context": "ProjectPanel && not_editing", + "bindings": { + "a": "project_panel::NewFile", + "A": "project_panel::NewDirectory", + "r": "project_panel::Rename", + "d": "project_panel::Delete", + "x": "project_panel::Cut", + "c": "project_panel::Copy", + "p": "project_panel::Paste", + "q": "workspace::ToggleRightDock", + }, + }, + { + "context": "Dock", + "bindings": { + "ctrl-w h": "workspace::ActivatePaneLeft", + "ctrl-w l": "workspace::ActivatePaneRight", + "ctrl-w k": "workspace::ActivatePaneUp", + "ctrl-w j": "workspace::ActivatePaneDown", + }, + }, + { + "context": "EmptyPane || SharedScreen", + "bindings": { + "space f": "file_finder::Toggle", + }, + }, +] diff --git a/zed/settings.json b/zed/settings.json new file mode 100644 index 0000000..c5c6b9c --- /dev/null +++ b/zed/settings.json @@ -0,0 +1,112 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run `zed: open default settings` from the +// command palette (cmd-shift-p / ctrl-shift-p) +{ + "cli_default_open_behavior": "new_window", + "diagnostics": { + "inline": { + "enabled": true, + }, + }, + "agent": { + "default_model": { + "provider": "copilot_chat", + "model": "gpt-5-mini", + "enable_thinking": true, + "effort": "high", + }, + "favorite_models": [ + { + "provider": "copilot_chat", + "model": "gpt-5-mini", + "enable_thinking": true, + "effort": "high", + }, + { + "provider": "copilot_chat", + "model": "gpt-5.4-mini", + "enable_thinking": true, + "effort": "high", + }, + { + "provider": "copilot_chat", + "model": "claude-sonnet-4.6", + "enable_thinking": true, + "effort": "high", + }, + { + "provider": "copilot_chat", + "model": "claude-haiku-4.5", + "enable_thinking": true, + }, + ], + "model_parameters": [], + }, + "auto_install_extensions": { + "catppuccin": true, + "catppuccin-icons": true, + "csharp": true, + "dockerfile": true, + "docker-compose": true, + }, + "file_types": { + "XML": ["csproj", "props", "proj", "slnx", "targets"], + }, + "code_lens": "on", + "git": { + "inline_blame": { + "delay_ms": 1000, + }, + "gutter_debounce": 2000, + }, + "toolbar": { + "code_actions": true, + }, + "terminal": { + "toolbar": { + "breadcrumbs": true, + }, + }, + "tabs": { + "file_icons": true, + "git_status": false, + }, + "show_whitespaces": "all", + "colorize_brackets": true, + "auto_signature_help": true, + "show_signature_help_after_edits": true, + "minimap": { + "show": "auto", + }, + "buffer_font_family": "JetBrainsMono Nerd Font Mono", + "which_key": { + "enabled": true, + }, + "telemetry": { + "diagnostics": true, + "metrics": false, + }, + "session": { + "trust_all_worktrees": true, + }, + // https://zed.dev/docs/vim + "vim_mode": true, + "vim": { + "use_system_clipboard": "on_yank", + "highlight_on_yank_duration": 500, + }, + "icon_theme": "Zed (Default)", + "ui_font_size": 16, + "buffer_font_size": 14.0, + "theme": { + "mode": "dark", + "light": "Catppuccin Latte", + "dark": "Catppuccin Macchiato", + }, + "base_keymap": "VSCode", +} From b4c6c3d49ab7f21dd1f2ceb3bf86fe88176aefc3 Mon Sep 17 00:00:00 2001 From: David JENNI <3200210+davidjenni@users.noreply.github.com> Date: Sun, 7 Jun 2026 17:50:05 -0700 Subject: [PATCH 2/3] scope json indent to zed/ Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .editorconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 025d2cb..c071ac1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,5 +13,8 @@ end_of_line = lf [*.{cmd,ps1,csv,doskey}] end_of_line = crlf -[*.{lua,json,sh,yml}] +[*.{lua,sh,yml}] +indent_size = 2 + +[zed/*.json] indent_size = 2 From 78c106da9a524b49ecb7a323ab85ec963ad1a211 Mon Sep 17 00:00:00 2001 From: "david@DAVID-PC" <3200210+davidjenni@users.noreply.github.com> Date: Sun, 7 Jun 2026 18:02:38 -0700 Subject: [PATCH 3/3] fix: don't install zed on macos/linux, since current pkg is macOS only --- bootstrap.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index c6bb886..dfe4a84 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -135,11 +135,13 @@ function installApps { tmux tre-command tokei - zed zoxide xz ) + # TODO: brew's package for zed is mac-only: conditionally add brew to apps array + # for linux/WSL, install as documented in: https://zed.dev/docs/installation#linux + local var casks=( font-jetbrains-mono-nerd-font ghostty