下载地址
设置 settings.json
注意可能需要手动下载主题
jsonc
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette
{
// disable ai features
"disable_ai": true,
// "agent": {
// "enabled": true,
// "default_profile": "ask",
// "default_model": {
// "provider": "aliyun",
// "model": "qwen2-1.5b-instruct"
// }
// },
// "language_models": {
// "openai_compatible": {
// "aliyun": {
// "api_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
// "available_models": [
// {
// "name": "qwen2-1.5b-instruct",
// "max_tokens": 200000,
// "max_output_tokens": 32000,
// "max_completion_tokens": 200000,
// "capabilities": {
// "tools": true,
// "images": false,
// "parallel_tool_calls": true,
// "prompt_cache_key": false
// }
// }
// ]
// }
// }
// },
"edit_predictions": {
"mode": "subtle",
"disabled_globs": ["**/*.md", "**/.env*", "**/*.pem", "**/*.key", "**/*.cert", "**/*.crt", "**/secrets.yml"]
},
"edit_predictions_disabled_in": ["comment"],
"features": {
"edit_prediction_provider": "none"
},
// auto save & auto format
"format_on_save": "off",
"autosave": "on_focus_change",
"preferred_line_length": 120,
"hard_tabs": false,
"tab_size": 2,
// disable soft wrap
"show_wrap_guides": false,
"soft_wrap": "none",
// git
"git": {
"git_gutter": "tracked_files",
"inline_blame": {
"enabled": false
}
},
// vim
"vim_mode": true,
"vim": {
"use_system_clipboard": "always",
"use_smartcase_find": true
},
// font
"ui_font_size": 18,
"buffer_font_size": 18,
"buffer_font_family": "JetBrainsMonoNL Nerd Font Mono",
"ui_font_family": "JetBrainsMonoNL Nerd Font Mono",
"buffer_line_height": "standard",
// theme
"theme": "One Dark",
// tab bar
"tab_bar": {
"show": true,
"show_nav_history_buttons": false
},
// tabs
"tabs": {
"file_icons": true,
"git_status": true
},
// scrollbar
"scrollbar": {
"show": "never"
},
// status bar
"toolbar": {
"breadcrumbs": false,
"quick_actions": false
},
// title bar
"title_bar": {
"show_branch_icon": true,
"show_branch_name": true,
"show_project_items": true,
"show_onboarding_banner": true,
"show_user_picture": true,
"show_sign_in": true,
"show_menus": true
},
// search
"search": {
"regex": true
},
// search files
"file_finder": {
"file_icons": true,
"modal_max_width": "large",
"skip_focus_for_active_in_search": true,
"git_status": true,
"include_ignored": "all"
},
// hits
"inlay_hints": {
"enabled": false
},
// hide collaboration panel
"collaboration_panel": {
"button": false
},
// terminal
"terminal": {
"font_size": 16,
"line_height": "standard"
},
// debugger
"debugger": {
"stepping_granularity": "line",
"save_breakpoints": true,
"dock": "left",
"button": true
},
// prettier
"prettier": {
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingCommas": "all",
"bracketSpacing": true,
"alwaysParens": true
},
// telemetry
"telemetry": {
"diagnostics": false,
"metrics": false
},
// auto update
"auto_update": false
}jsonc
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"bindings": {
"ctrl-j": "menu::SelectNext",
"ctrl-k": "menu::SelectPrevious"
}
},
{
// for vim normal mode
"context": "VimControl && !menu",
"bindings": {
"space space": "file_finder::Toggle",
"shift-l": "pane::ActivateNextItem",
"shift-h": "pane::ActivatePreviousItem",
"space o u": "editor::OpenUrl",
"space f s": "workspace::Save",
"space c a": "editor::ToggleCodeActions",
"space b d": "pane::CloseActiveItem",
"space b o": "workspace::CloseInactiveTabsAndPanes",
"space s s": "outline::Toggle",
"space f f": "editor::Format",
"space r n": "editor::Rename",
"space q l": "projects::OpenRecent",
"space r r": "buffer_search::DeployReplace",
// toggle panels
"ctrl-e": "project_panel::ToggleFocus",
"ctrl-x": "workspace::ToggleBottomDock",
"space a": "agent::ToggleFocus",
// tabs
"space b h": [
"pane::CloseItemsToTheLeft",
{
"close_pinned": false
}
],
"space b l": [
"pane::CloseItemsToTheRight",
{
"close_pinned": false
}
],
"space b shift-h": "pane::SwapItemLeft",
"space b shift-l": "pane::SwapItemRight",
// scroll
"ctrl-d": ["workspace::SendKeystrokes", "5 j z z"],
"ctrl-u": ["workspace::SendKeystrokes", "5 k z z"],
// lazygit & yazi: need task.json config
"ctrl-g": ["task::Spawn", { "task_name": "lazygit" }],
"ctrl-f": ["task::Spawn", { "task_name": "yazi" }]
}
},
{
// toggle terminal in terminal
"context": "Workspace",
"bindings": {
"ctrl-x": "workspace::ToggleBottomDock"
}
},
{
"context": "VimControl && vim_mode == normal",
"bindings": {
"space q q": "zed::Quit",
"space f s": "workspace::Save",
"ctrl-\\": ["workspace::SendKeystrokes", "g c c"],
"ctrl-g": ["task::Spawn", { "task_name": "lazygit" }]
}
},
{
// for vim visual mode
"context": "VimControl && vim_mode == visual",
"bindings": {
"ctrl-\\": ["workspace::SendKeystrokes", "g c"]
}
},
{
// for vim insert mode
"context": "vim_mode == insert",
"bindings": {
"ctrl-o": "editor::ShowCompletions",
"ctrl-e": "editor::Cancel",
"ctrl-a": "assistant::InlineAssist",
"ctrl-h": "editor::Backtab",
"ctrl-l": "editor::Tab"
}
},
{
// select code suggestion
"context": "Editor && vim_mode == insert && (showing_code_actions || showing_completions)",
"bindings": {
"ctrl-k": "editor::ContextMenuPrevious",
"ctrl-j": "editor::ContextMenuNext"
}
},
{
// file explorer
"context": "ProjectPanel && not_editing",
"bindings": {
":": "command_palette::Toggle",
"ctrl-e": "workspace::ToggleLeftDock",
"shift-a": "project_panel::NewDirectory",
"a": "project_panel::NewFile",
"o": "project_panel::OpenPermanent",
"r": "project_panel::Rename",
"x": [
"project_panel::Trash",
{
"skip_prompt": false
}
],
"d": "project_panel::Cut",
"y": "project_panel::Copy",
"shift-y": "workspace::CopyPath",
"ctrl-y": "workspace::CopyRelativePath",
"p": "project_panel::Paste",
"ctrl-enter": "project_panel::RevealInFileManager"
}
}
]jsonc
// Project tasks configuration. See https://zed.dev/docs/tasks for documentation.
//
// Example:
[
// {
// "label": "Example task",
// "command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done",
// //"args": [],
// // Env overrides for the command, will be appended to the terminal's environment from the settings.
// "env": { "foo": "bar" },
// // Current working directory to spawn the command into, defaults to current project root.
// //"cwd": "/path/to/working/directory",
// // Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`.
// "use_new_terminal": false,
// // Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`.
// "allow_concurrent_runs": false,
// // What to do with the terminal pane and tab, after the command was started:
// // * `always` — always show the task's pane, and focus the corresponding tab in it (default)
// // * `no_focus` — always show the task's pane, add the task's tab in it, but don't focus it
// // * `never` — do not alter focus, but still add/reuse the task's tab in its pane
// "reveal": "always",
// // Where to place the task's terminal item after starting the task:
// // * `dock` — in the terminal dock, "regular" terminal items' place (default)
// // * `center` — in the central pane group, "main" editor area
// "reveal_target": "dock",
// // What to do with the terminal pane and tab, after the command had finished:
// // * `never` — Do nothing when the command finishes (default)
// // * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it
// // * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always`
// "hide": "never",
// // Which shell to use when running a task inside the terminal.
// // May take 3 values:
// // 1. (default) Use the system's default terminal configuration in /etc/passwd
// // "shell": "system"
// // 2. A program:
// // "shell": {
// // "program": "sh"
// // }
// // 3. A program with arguments:
// // "shell": {
// // "with_arguments": {
// // "program": "/bin/bash",
// // "args": ["--login"]
// // }
// // }
// "shell": "system",
// // Represents the tags for inline runnable indicators, or spawning multiple tasks at once.
// "tags": []
// },
{
// 集成 lazygit
"label": "lazygit",
"command": "lazygit",
"reveal_target": "center",
"hide": "on_success",
"args": [],
"env": {},
"use_new_terminal": true,
"allow_concurrent_runs": false
},
{
// 集成 yazi
"label": "yazi",
"command": "yazi",
"reveal_target": "center", // show terminal in editor tabs
"hide": "on_success", // hide terminal when exit lazygit
"args": [],
"env": {},
"use_new_terminal": true,
"allow_concurrent_runs": false
}
]