diff --git a/home/base/core/editors/helix/README.md b/home/base/core/editors/helix/README.md index bc3cb840..e1a4596f 100644 --- a/home/base/core/editors/helix/README.md +++ b/home/base/core/editors/helix/README.md @@ -51,8 +51,7 @@ In Helix, `|` / `!` and variants pipe or insert shell output on selections (see This flake’s Helix Home Manager module keeps **almost all default keys**; the only remap is **`Ctrl+Shift+o`** → jump backward, because Zellij uses **`Ctrl+o`** for Session (see -`home/base/core/editors/helix/default.nix`). For other Zellij clashes, use **locked mode** -(`Ctrl+g`), **`:`** commands, or the built-in **`Space`** menu. +`home/base/core/editors/helix/default.nix`). ### Command mode (`:`) @@ -64,6 +63,7 @@ This flake’s Helix Home Manager module keeps **almost all default keys**; the | Quit view / quit all | `:q` / `:qa` — add `!` to discard changes | | Write and quit | `:wq`, `:x` | | Write all and quit all | `:wqa`, `:xa` | +| Save to path | `:w path` | | Open file | `:open path`, `:e path` | | Next / previous buffer | `:bn` / `:bp` (also `gn` / `gp` in normal) | | Close buffer | `:bc` (add `!` to force) | @@ -73,37 +73,51 @@ This flake’s Helix Home Manager module keeps **almost all default keys**; the ### Movement (normal mode) -| Action | Keys / notes | -| --------------------- | --------------------------------------------------- | -| Arrow keys | `h` `j` `k` `l` | -| Words | `w` `b` `e` — `W` `B` `E` for WORD-style | -| Find char / till char | `f` `F` `t` `T` (not limited to current line) | -| Line / file | `Home` / `End`; `gg` start or goto line; `G` line | -| Half / full page | `Ctrl-u` / `Ctrl-d`; `Ctrl-b` / `Ctrl-f` | -| Jumplist | `Ctrl-o` back, `Ctrl-i` forward; `Ctrl-s` save spot | +| Action | Keys / notes | +| --------------------- | -------------------------------------------------------------------- | +| Arrow keys | `h` `j` `k` `l` | +| Words | `w` `b` `e` — `W` `B` `E` for WORD-style | +| Counts | Prefix motions with a count: `2w`, `3e`, `2b`, `2x` | +| Find char / till char | `f` `F` `t` `T` (not limited to current line) | +| Repeat find / till | `Alt-.` repeats the last `f` / `t` selection | +| Word-label jump | `gw` shows two-character labels; type a label to jump, `Esc` cancels | +| Line / file | `Home` / `End`; `gg` start or goto line; `G` line | +| Half / full page | `Ctrl-u` / `Ctrl-d`; `Ctrl-b` / `Ctrl-f` | +| Jumplist | `Ctrl-o` back, `Ctrl-i` forward; `Ctrl-s` save spot | ### Selection & changes -| Action | Keys / notes | -| ---------------------- | ----------------------------------------------------------------- | -| Extend selections | `v` select mode; motions extend instead of moving | -| Line selection | `x` extend line; `X` line bounds | -| Select all / regex | `%`; `s` regex in selections; `S` split on regex | -| Undo / redo | `u` / `U` | -| Delete / change / yank | `d` / `c` / `y` — acts on selection | -| Paste | `p` / `P`; registers `"` … | -| Insert | `i` `a` `I` `A` `o` `O` | -| Indent / format | `>` / `<`; `=` format (LSP) | -| Case | `~` toggle; lower/upper case via grave / `Alt-grave` (see keymap) | -| Join lines | `J`; `Alt-J` join keeping space | +| Action | Keys / notes | +| ---------------------- | --------------------------------------------------------------------------- | +| Extend selections | `v` select mode; motions extend instead of moving; `v` or `Esc` leaves mode | +| Line selection | `x` extend line; `X` line bounds; repeat or use a count for more lines | +| Collapse selections | `;` collapse selections back to cursors | +| Select all / regex | `%`; `s` regex in selections; `S` split on regex | +| Multiple cursors | `C` duplicate to next suitable line; `Alt-C` above; `,` remove one cursor | +| Align selections | `&` align selection contents | +| Undo / redo | `u` / `U` | +| Delete / change / yank | `d` / `c` / `y` — acts on selection | +| Replace with yank | `R` replace selection with yanked text | +| Paste | `p` / `P`; registers `"` … | +| Register prefix | `"` selects a register for yank/paste/macro operations | +| Insert | `i` `a` `I` `A` `o` `O` | +| Repeat insert | `.` repeat the last insertion | +| Replace selected chars | `r` | +| Indent / format | `>` / `<`; `=` format (LSP) | +| Increment / decrement | `Ctrl-a` / `Ctrl-x` on selected numbers | +| Case | `~` toggle; lower/upper case via grave / `Alt-grave` (see Alt caveat above) | +| Join lines | `J`; `Alt-J` join keeping space (see Alt caveat above) | +| Toggle line comment | `Ctrl-c` | +| Macro record / replay | `Q` start/stop recording; `q` replay from the default `@` register | ### Search -| Action | Keys | -| -------------------- | ---------------------------------------- | -| Search / reverse | `/` / `?` | -| Next / prev match | `n` / `N` | -| Selection as pattern | `*` (word bounds); `Alt-*` raw selection | +| Action | Keys | +| -------------------- | --------------------------------------------------------------- | +| Search / reverse | `/` / `?` | +| Next / prev match | `n` / `N` | +| Selection as pattern | `*` (word bounds); `Alt-*` raw selection (see Alt caveat above) | +| Split on newlines | `Alt-s` | Use **extend mode** (`v`) with `n` / `N` to add matches to multi-cursors ([keymap](https://docs.helix-editor.com/keymap.html#select--extend-mode)). diff --git a/home/base/gui/zed-editor.nix b/home/base/gui/zed-editor.nix new file mode 100644 index 00000000..3c2ca8ef --- /dev/null +++ b/home/base/gui/zed-editor.nix @@ -0,0 +1,59 @@ +{ lib, ... }: +{ + catppuccin.zed.enable = true; + + programs.zed-editor = { + enable = true; + mutableUserSettings = true; + + userSettings = { + # Editor behavior + autosave = "on_focus_change"; + inlay_hints.enabled = true; + soft_wrap = "editor_width"; + which_key.enabled = true; + + # Modal editing + helix_mode = true; + vim = { + use_smartcase_find = true; + toggle_relative_line_numbers = true; + }; + + # Font sizing + ui_font_size = lib.mkDefault 16.0; + buffer_font_size = lib.mkDefault 14.0; + agent_ui_font_size = lib.mkDefault 16.0; + agent_buffer_font_size = lib.mkDefault 15.0; + + # App behavior + auto_update = false; + + # AI/editor integrations + agent.play_sound_when_agent_done = "when_hidden"; + agent_servers = { + opencode.type = "registry"; + cursor.type = "registry"; + codex-acp.type = "registry"; + claude-acp.type = "registry"; + }; + + # Privacy + edit_predictions.allow_data_collection = "no"; + telemetry = { + diagnostics = false; + metrics = false; + }; + }; + + extensions = [ + "catppuccin" + "dockerfile" + "just" + "nix" + "nu" + "terraform" + "toml" + ]; + }; +} diff --git a/home/darwin/aerospace/aerospace.toml b/home/darwin/aerospace/aerospace.toml index 56ecd60e..a530f526 100644 --- a/home/darwin/aerospace/aerospace.toml +++ b/home/darwin/aerospace/aerospace.toml @@ -280,10 +280,6 @@ run = ['layout floating', 'move-node-to-workspace 9File'] if.app-id = 'com.apple.Preview' run = ['layout floating', 'move-node-to-workspace 9File'] -[[on-window-detected]] -if.app-id = 'com.microsoft.VSCode' -run = ['layout floating', 'move-node-to-workspace 9File'] - [[on-window-detected]] if.app-id = 'com.todesktop.230313mzl4w4u92' # Cursor AI Editor run = ['layout floating', 'move-node-to-workspace 9File'] diff --git a/home/hosts/linux/idols-ai.nix b/home/hosts/linux/idols-ai.nix index 3dd6e4ae..d035f668 100644 --- a/home/hosts/linux/idols-ai.nix +++ b/home/hosts/linux/idols-ai.nix @@ -11,6 +11,13 @@ in modules.desktop.niri.enable = true; modules.desktop.nvidia.enable = true; + programs.zed-editor.userSettings = { + ui_font_size = 19.0; + buffer_font_size = 17.0; + agent_ui_font_size = 19.0; + agent_buffer_font_size = 18.0; + }; + xdg.configFile."niri/niri-hardware.kdl".source = mkSymlink "${config.home.homeDirectory}/nix-config/hosts/idols-ai/niri-hardware.kdl"; } diff --git a/home/linux/gui/base/editors.nix b/home/linux/gui/base/editors.nix deleted file mode 100644 index e331ed0b..00000000 --- a/home/linux/gui/base/editors.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - lib, - pkgs-master, - ... -}: - -{ - programs.vscode = { - enable = true; - package = pkgs-master.vscode.override { - commandLineArgs = [ - # https://code.visualstudio.com/docs/configure/settings-sync#_recommended-configure-the-keyring-to-use-with-vs-code - # For use with any package that implements the Secret Service API - # (for example gnome-keyring, kwallet5, KeepassXC) - "--password-store=gnome-libsecret" - ]; - }; - }; -} diff --git a/home/linux/gui/base/xdg/mime.nix b/home/linux/gui/base/xdg/mime.nix index 5879220d..e48d566c 100644 --- a/home/linux/gui/base/xdg/mime.nix +++ b/home/linux/gui/base/xdg/mime.nix @@ -18,10 +18,9 @@ "firefox.desktop" ]; editor = [ + "dev.zed.Zed.desktop" "nvim.desktop" "Helix.desktop" - "code.desktop" - "code-insiders.desktop" ]; in { @@ -48,9 +47,6 @@ "x-scheme-handler/ftp" = browser; # open `ftp:` url with `browser` "x-scheme-handler/http" = browser; "x-scheme-handler/https" = browser; - # https://github.com/microsoft/vscode/issues/146408 - "x-scheme-handler/vscode" = [ "code-url-handler.desktop" ]; # open `vscode://` url with `code-url-handler.desktop` - "x-scheme-handler/vscode-insiders" = [ "code-insiders-url-handler.desktop" ]; # open `vscode-insiders://` url with `code-insiders-url-handler.desktop` "x-scheme-handler/zoommtg" = [ "Zoom.desktop" ]; # all other unknown schemes will be opened by this default application. diff --git a/hosts/idols-ai/README.md b/hosts/idols-ai/README.md index a38d2a94..6c67ae2b 100644 --- a/hosts/idols-ai/README.md +++ b/hosts/idols-ai/README.md @@ -82,7 +82,6 @@ nvme0n1 259:0 0 1.8T 0 disk /home/ryan/.zoom /home/ryan/Documents /home/ryan/.wakatime - /home/ryan/.vscode /home/ryan/.var /home/ryan/.terraform.d/plugin-cache /home/ryan/.steam @@ -106,6 +105,7 @@ nvme0n1 259:0 0 1.8T 0 disk /home/ryan/.local/share/password-store /home/ryan/.local/share/opencode /home/ryan/.local/share/nvim + /home/ryan/.local/share/zed /home/ryan/.local/share/nix /home/ryan/.local/share/krita /home/ryan/.local/share/lutris @@ -140,6 +140,7 @@ nvme0n1 259:0 0 1.8T 0 disk /home/ryan/.config/obs-studio /home/ryan/.config/mozc /home/ryan/.config/nushell + /home/ryan/.config/zed /home/ryan/.config/lutris /home/ryan/.config/joplin /home/ryan/.config/heroic @@ -151,7 +152,6 @@ nvme0n1 259:0 0 1.8T 0 disk /home/ryan/.config/LDtk /home/ryan/.config/Joplin /home/ryan/.config/Cursor - /home/ryan/.config/Code /home/ryan/.conda /home/ryan/.cargo /home/ryan/.codex diff --git a/hosts/idols-ai/preservation.nix b/hosts/idols-ai/preservation.nix index 6c68571b..253ac0aa 100644 --- a/hosts/idols-ai/preservation.nix +++ b/hosts/idols-ai/preservation.nix @@ -133,9 +133,9 @@ in # neovim plugins ".wakatime" - # vscode - ".vscode" - ".config/Code" + # zed + ".config/zed" + ".local/share/zed" # cursor ai editor / cli ".cursor" diff --git a/modules/darwin/apps.nix b/modules/darwin/apps.nix index 762f8868..943366b3 100644 --- a/modules/darwin/apps.nix +++ b/modules/darwin/apps.nix @@ -157,9 +157,6 @@ in "firefox" "google-chrome" - # code editor - "visual-studio-code" - "nikitabobko/tap/aerospace" # an i3-like tiling window manager for macOS "ghostty" # terminal emulator diff --git a/modules/nixos/desktop/xdg.nix b/modules/nixos/desktop/xdg.nix index f2415bdc..8add421d 100644 --- a/modules/nixos/desktop/xdg.nix +++ b/modules/nixos/desktop/xdg.nix @@ -48,7 +48,6 @@ # which resolves bugs involving programs opening inside FHS envs or with unexpected env vars set from wrappers. # xdg-open is used by almost all programs to open a unknown file/uri # alacritty as an example, it use xdg-open as default, but you can also custom this behavior - # and vscode has open like `External Uri Openers` xdgOpenUsePortal = true; # ls /run/current-system/sw/share/xdg-desktop-portal/portals/