From 0a95ccd9a5c6f88860d45147ec45ee325cbc42fc Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 29 May 2025 13:44:28 +0700 Subject: [PATCH] chore(zed): Adjust keymaps to match nvim Probably gonna put this on halt for now as I notice zed doesn't have TODO/FIXME highlighting yet. --- .config/nvim/lua/null/remap.lua | 4 ++-- .config/zed/keymap.json | 20 ++++++++++++++++---- .config/zed/settings.json | 13 ++++++++++++- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.config/nvim/lua/null/remap.lua b/.config/nvim/lua/null/remap.lua index 9e70cb1..79dcc2a 100644 --- a/.config/nvim/lua/null/remap.lua +++ b/.config/nvim/lua/null/remap.lua @@ -7,9 +7,9 @@ map("n", "", "U") map("n", "U", "") -- Yank and Put -map("n", "", '"+y') +map("nv", "", '"+y') map("n", "", '"+p') -map("n", "", '"+y') +map("nv", "", '"+y') map("n", "", '"+p') -- Comment a line like how it is on VSC (using vim-commentary) diff --git a/.config/zed/keymap.json b/.config/zed/keymap.json index 78f5c8d..e5d324a 100644 --- a/.config/zed/keymap.json +++ b/.config/zed/keymap.json @@ -7,15 +7,27 @@ // from the command palette. [ { - "context": "Workspace", + "context": "!ProjectPanel", "bindings": { - // "shift shift": "file_finder::Toggle" + "ctrl-n": "project_panel::ToggleFocus" } }, { - "context": "Editor", + "context": "ProjectPanel", "bindings": { - // "j k": ["workspace::SendKeystrokes", "escape"] + "ctrl-n": "workspace::ToggleLeftDock" + } + }, + { + "context": "vim_mode == normal", + "bindings": { + // NOTE: No need to rebind yank (y) and paste (p) since they are basically act the same as "+y and "+p in vim + "U": "vim::Redo" + /* + // is signed to replace "U" which resigned as vim::Redo, but "U" doesn't seems to exists in zed? + // According to the documentation, "U" is "return the last line which was modified to its original state" + "ctrl-u": "", + */ } } ] diff --git a/.config/zed/settings.json b/.config/zed/settings.json index db8d973..0f6419f 100644 --- a/.config/zed/settings.json +++ b/.config/zed/settings.json @@ -20,7 +20,18 @@ "buffer_font_family": "Iosevka Nerd Font", "languages": { "kotlin": { - "language_servers": ["kotlin-lsp"] + "language_servers": ["kotlin-language-server"] } + }, + // AI stuff + "features": { + "edit_prediction_provider": "supermaven" + }, + "agent": { + /* + "enabled": false, + "button": false, + "version": "1" + */ } }