From cd0a5cbeb9727d3ac141369db1349949b014019a Mon Sep 17 00:00:00 2001 From: Pratik Tripathy Date: Mon, 28 Jul 2025 10:34:33 +0530 Subject: [PATCH] feat(zed): Rust dev setup on Zed --- common/.config/zed/keymap.json | 6 ++++++ common/.config/zed/settings.json | 22 +++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/common/.config/zed/keymap.json b/common/.config/zed/keymap.json index a71fdc3..7ed62f2 100644 --- a/common/.config/zed/keymap.json +++ b/common/.config/zed/keymap.json @@ -1,5 +1,7 @@ // To see the default key bindings run `zed: open default keymap` // TODO: Enable spell checking in VIM mode +// FIX: ctrl+n & ctrl+p selections don't work on terminal: cause they are hijacked by IDE +// - Use them to select next & previous [ { @@ -78,6 +80,10 @@ // // https://github.com/tommcdo/vim-exchange // https://github.com/jeetsukumaran/vim-indentwise + // + // AI: + // Accept edit-prediction on Linux => alt-l + // Accept next predicted word => alt-right "space tab": "project_panel::ToggleFocus", "space / /": "journal::NewJournalEntry", diff --git a/common/.config/zed/settings.json b/common/.config/zed/settings.json index 6157e93..0fb2fa0 100644 --- a/common/.config/zed/settings.json +++ b/common/.config/zed/settings.json @@ -32,7 +32,7 @@ "ui_font_size": 16, "buffer_font_size": 18, "buffer_font_family": "FuraCode Nerd Font", - "agent_font_size": 28, + "agent_font_size": 18, "terminal": { "font_family": "FuraCode Nerd Font", "font_size": 18, @@ -112,8 +112,8 @@ "agent": { "default_profile": "ask", "default_model": { - "provider": "zed.dev", - "model": "claude-sonnet-4" + "provider": "lmstudio", + "model": "mistralai/codestral-22b-v0.1" }, "model_parameters": [], "notify_when_agent_waiting": "all_screens" @@ -125,5 +125,21 @@ "Markdown": { "show_edit_predictions": false } + }, + + "lsp": { + "rust-analyzer": { + "initialization_options": { + "inlayHints": { + "maxLength": null, + "lifetimeElisionHints": { + "useParameterNames": true + }, + "closureReturnTypeHints": { + "enable": "always" + } + } + } + } } }