From 1ed1614b70304b0a05b702d162e972e5321ad20b Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 12 Jan 2025 18:04:33 +0100 Subject: [PATCH] zed stuff --- .config/zed/keymap.json | 111 ++++++++++++++++++++++---------------- .config/zed/settings.json | 17 +++++- 2 files changed, 81 insertions(+), 47 deletions(-) diff --git a/.config/zed/keymap.json b/.config/zed/keymap.json index 9fc5140..0525e87 100644 --- a/.config/zed/keymap.json +++ b/.config/zed/keymap.json @@ -7,51 +7,12 @@ // from the command palette. [ { - "context": "Workspace", - "bindings": { - "f5": "workspace::ToggleLeftDock", - "alt-v": "terminal_panel::ToggleFocus", - } - }, - { - "context": "Picker", "bindings": { "shift-tab": "menu::SelectPrev", - "tab": "menu::SelectNext" - } - }, - { - "context": "BufferSearchBar && !in_replace > Editor", - "bindings": { - "shift-tab": "menu::SelectPrev", - "tab": "menu::SelectNext" - } - }, - { - "context": "Terminal", - "bindings": { - "alt-v": "workspace::ToggleBottomDock", - "ctrl-w": "terminal::ToggleViMode" - } - }, - { - "context": "Terminal && VimControl", - "bindings": { - "tab": "pane::ActivateNextItem", - "shift-tab": "pane::ActivatePrevItem", - } - }, - { - "context": "Editor", - "bindings": { - "; f s": "outline::Toggle", - "; f w": "workspace::NewSearch", - "; f t": "theme_selector::Toggle", - } - }, - { - "context": "VimControl && !menu", - "bindings": { + "tab": "menu::SelectNext", + "alt-c": "pane::CloseActiveItem", + "ctrl-shift-w": null, + "ctrl-q": null, "ctrl-h": [ "workspace::ActivatePaneInDirection", "Left" @@ -68,12 +29,43 @@ "workspace::ActivatePaneInDirection", "Down" ], + } + }, + { + "context": "Workspace", + "bindings": { + "f5": "workspace::ToggleLeftDock", + "alt-v": "terminal_panel::ToggleFocus", + } + }, + { + "context": "menu", + "bindings": { + "shift-tab": "menu::SelectPrev", + "tab": "menu::SelectNext", + "f4": "menu::SelectPrev", + "f6": "menu::SelectNext" + } + }, + { + "context": "Terminal", + "bindings": { + "alt-v": "workspace::ToggleBottomDock", + "ctrl-w": "terminal::ToggleViMode" + } + }, + { + "context": "VimControl && !menu", + "bindings": { + "; f s": "outline::Toggle", + "; f w": "workspace::NewSearch", + "; f t": "theme_selector::Toggle", + "; f f": "file_finder::Toggle", "L": "vim::EndOfLine", "H": "vim::StartOfLine", "left": "editor::TabPrev", "right": "editor::Indent", "space v": "editor::ToggleComments", - "alt-c": "pane::CloseActiveItem", "alt-j": "vim::ScrollDown", "alt-k": "vim::ScrollUp", "up": "editor::MoveLineUp", @@ -83,9 +75,18 @@ "space p": "editor::Paste", "tab": "pane::ActivateNextItem", "shift-tab": "pane::ActivatePrevItem", - "space \"": "pane::SplitVertical", + "space \"": "pane::SplitRight", "space %": "pane::SplitHorizontal", "space c r": "editor::Rename", + "space c t r": "diagnostics::Deploy", + "#": [ + "vim::PushOperator", + { + "Jump": { + "line": true + } + } + ], } }, { @@ -116,4 +117,24 @@ "tab": "editor::ContextMenuNext", } }, + { + "context": "ProjectPanel && not_editing", + "bindings": { + "n": "project_panel::NewFile", + "N": "project_panel::NewDirectory", + "r": "project_panel::Rename", + "d": [ + "project_panel::Trash", + { + "skip_prompt": false + } + ], + "D": [ + "project_panel::Delete", + { + "skip_prompt": false + } + ], + } + }, ] diff --git a/.config/zed/settings.json b/.config/zed/settings.json index 08491b3..6752a04 100644 --- a/.config/zed/settings.json +++ b/.config/zed/settings.json @@ -7,20 +7,28 @@ // custom settings, run `zed: open default settings` from the // command palette (cmd-shift-p / ctrl-shift-p) { + "vim": { + "use_system_clipboard": "on_yank" + }, + "relative_line_numbers": true, "features": { "inline_completion_provider": "none" }, "assistant": { + "default_model": { + "provider": "zed.dev", + "model": "claude-3-5-sonnet-latest" + }, "dock": "right", "version": "2" }, + "buffer_font_size": 17, "format_on_save": "language_server", "formatter": "language_server", "buffer_font_family": "FiraCode Nerd Font", "tab_size": 4, "vim_mode": true, "ui_font_size": 16, - "buffer_font_size": 16, "theme": { "mode": "system", "light": "One Light", @@ -56,5 +64,10 @@ }, } } - } + }, + "soft_wrap": "editor_width", + "show_wrap_guides": true, + "wrap_guides": [ + 80 + ], }