From 28e1135dd7287aff77b29ce566c6c7a4d6d67b4d Mon Sep 17 00:00:00 2001 From: Yu Cong Date: Mon, 12 Jan 2026 14:02:31 +0800 Subject: [PATCH] update zed tasks and keymap --- zed/keymap.json | 39 +++++++++++++-------------- zed/settings.json | 67 ++++++++++++++++++++++------------------------- zed/tasks.json | 9 +++++++ 3 files changed, 58 insertions(+), 57 deletions(-) diff --git a/zed/keymap.json b/zed/keymap.json index 6effe95..4598820 100644 --- a/zed/keymap.json +++ b/zed/keymap.json @@ -6,25 +6,22 @@ // To see the default key bindings run `zed: open default keymap` // from the command palette. [ - { - "context": "Workspace", - "bindings": { - // "shift shift": "file_finder::Toggle" - } - }, - { - "context": "Editor", - "bindings": { - // "j k": ["workspace::SendKeystrokes", "escape"] - } - }, - { - "context": "VimControl && !menu", - "bindings": { - "j": ["vim::Down", { "display_lines": true }], - "k": ["vim::Up", { "display_lines": true }], - "g j": "vim::Down", - "g k": "vim::Up" - } - } + { + "context": "Workspace", + "bindings": { + // "shift shift": "file_finder::Toggle" + }, + }, + { + "context": "Editor", + "bindings": { + // "j k": ["workspace::SendKeystrokes", "escape"] + }, + }, + { + "context": "Editor && extension==tex", // This restricts the keybindings to tex files however does not work when in terminal + "bindings": { + "ctrl-alt-f": ["task::Spawn", { "task_name": "forward_search" }] + }, + }, ] diff --git a/zed/settings.json b/zed/settings.json index e58040e..05ac474 100644 --- a/zed/settings.json +++ b/zed/settings.json @@ -7,58 +7,53 @@ // custom settings, run `zed: open default settings` from the // command palette (cmd-shift-p / ctrl-shift-p) { + "ui_font_size": 15.0, + "buffer_font_weight": 400.0, "drag_and_drop_selection": { "delay": 0, - "enabled": true + "enabled": true, }, "terminal": { "font_family": ".ZedMono", "detect_venv": "off", - "font_size": 14 + "font_size": 14, }, - "show_wrap_guides": true, "title_bar": { - "show_sign_in": false + "show_sign_in": false, }, "git_panel": { - "default_width": 320.0 + "default_width": 280.0, }, "outline_panel": { - "default_width": 320.0 + "default_width": 280.0, }, "notification_panel": { - "dock": "right" + "dock": "right", }, "debugger": { - "dock": "bottom" + "dock": "bottom", }, "edit_predictions": { "mode": "subtle", "copilot": { "proxy": null, - "proxy_no_verify": null + "proxy_no_verify": null, }, - "enabled_in_text_threads": false + "enabled_in_text_threads": false, }, "telemetry": { "diagnostics": false, - "metrics": false + "metrics": false, }, "base_keymap": "VSCode", - "buffer_font_features": { - "calt": false, - "NWID": true - }, - "ui_font_size": 14, "buffer_font_family": "Iosevka Terminal Wide", "buffer_font_size": 14, "buffer_line_height": "comfortable", "project_panel": { - "default_width": 320.0, + "default_width": 280.0, "scrollbar": { - "show": "never" - }, - "entry_spacing": "standard" + "show": "never", + } }, "tab_size": 4, "format_on_save": "off", @@ -68,24 +63,24 @@ "soft_wrap": "editor_width", "git": { "inline_blame": { - "enabled": false - } + "enabled": false, + }, }, "collaboration_panel": { - "button": false + "button": false, }, "agent": { - "enabled": false + "enabled": false, }, "features": { // "copilot": false, - "edit_prediction_provider": "none" + "edit_prediction_provider": "none", }, // "vim_mode": true, "languages": { "Haskell": { - "tab_size": 2 - } + "tab_size": 2, + }, }, ////// LSP config ////// "lsp": { @@ -94,20 +89,20 @@ "texlab": { "build": { "onSave": true, - "forwardSearchAfter": false - } - } - } + "forwardSearchAfter": false, + }, + }, + }, }, "clangd": { "binary": { "ignore_system_version": true, "path": "/opt/homebrew/opt/llvm/bin/clangd", - "arguments": [] - } - } + "arguments": [], + }, + }, }, "file_types": { - "Cython":["sage"] - } + "Cython": ["sage"], + }, } diff --git a/zed/tasks.json b/zed/tasks.json index e69de29..8065805 100644 --- a/zed/tasks.json +++ b/zed/tasks.json @@ -0,0 +1,9 @@ +[ + { + "label": "forward_search", + "command": "/Applications/Skim.app/Contents/SharedSupport/displayline -g $ZED_ROW $ZED_DIRNAME/$ZED_STEM.pdf", + "allow_concurrent_runs": false, + "reveal": "never", + "hide": "always" + } +] \ No newline at end of file