Zed 是一款高性能的多人协作代码编辑器,出自 Atom 和 Tree-sitter 的创建者之手。它也是开源的。主要有以下优点:
使用流畅 使用不阻碍你的工具开始高效编码。Zed 结合了 IDE 的强大功能和轻量编辑器的灵敏性,让你能够亲身体验更高的产品力。
专为性能而设计 Zed 有效利用了每个 CPU 内核和您的 GPU,从而可以立即启动、瞬间加载文件,并在下一个显示刷新时对您的按键做出响应。强劲的性能让您保持高效工作,让其他工具感觉滞后。
智能即时服务 通过人工智能生成代码,节省时间和击键。Zed 支持 GitHub Copilot 开箱即用,您可以使用 GPT-4 通过按下 ctrl-enter 并输入自然语言提示来生成或重构代码。在内置助手面板中与模型进行对话交互,无需切换上下文,然后在内联生成过程中参考您的对话。
语言感知 Zed 在您输入时为每个缓冲区维护完整的语法树,实现精确的代码高亮、自动缩进、可搜索的大纲视图和结构选择。Zed 还支持语言服务器协议,提供自动完成、代码导航、诊断和重构。
您可以通过下载页面获取稳定版本。如果您想下载我们的预览版本,您可以在其发布页面找到。在第一次手动安装后,Zed 将定期检查并自动为您安装更新。 您也可以通过 Homebrew 安装 Zed 稳定版:
bashbrew install --cask zed
以及 Zed 预览版:
bashbrew install --cask zed@preview
对于大多数人来说,安装 Zed 最简单的方法是通过我们的安装脚本:
bashcurl https://zed.dev/install.sh | sh
如果您想帮助我们测试新功能,您也可以安装我们的预览版本:
bashcurl https://zed.dev/install.sh | ZED_CHANNEL=preview sh
此脚本支持 x86_64 和 AArch64,以及常见的 Linux 发行版:Ubuntu、Arch、Debian、RedHat、CentOS、Fedora 等。
如果此脚本不适合您的用例或在运行 Zed 时遇到问题,请参考 Linux 特定文档。
Zed 版本号: 0.163.3
json{
"ssh_connections": [
{
"host": "debian.local",
"username": "root",
"projects": [
{
"paths": ["/root"]
}
]
}
],
"assistant": {
"default_model": {
"provider": "zed.dev",
"model": "claude-3-5-sonnet-20240620"
},
"version": "2"
},
"theme": "One Dark Pro",
"telemetry": {
"diagnostics": false,
"metrics": false
},
"autosave": "on_window_change",
// UI
"ui_font_size": 16,
"ui_font_family": "Roboto Mono",
// Editor
"buffer_font_size": 16,
"buffer_font_family": "Roboto Mono",
"buffer_font_features": {
"calt": false
},
"toolbar": {
// Whether to show breadcrumbs.
"breadcrumbs": true,
// Whether to show quick action buttons.
"quick_actions": false,
// Whether to show the Selections menu in the editor toolbar
"selections_menu": false
},
"tabs": {
"git_status": true
},
// Other
"confirm_quit": true,
"inline_completions": {
"disabled_globs": [".env"]
},
"current_line_highlight": "all",
"chat_panel": {
// Whether to show the chat panel button in the status bar.
"button": false
},
"outline_panel": {
"button": false
},
"notification_panel": {
// Whether to show the notification panel button in the status bar.
"button": false
},
"soft_wrap": "editor_width",
"terminal": {
"button": true,
"copy_on_select": true,
"blinking": "on",
"font_family": "Roboto Mono"
},
"features": {
"inline_completion_provider": "none"
},
// "assistant": {
// // Version of this setting.
// "default_model": {
// "provider": "openai",
// "model": "gpt-4o-mini"
// },
// "version": "2",
// // Whether the assistant is enabled.
// "enabled": true,
// // Whether to show the assistant panel button in the status bar.
// "button": true,
// // Where to dock the assistant panel. Can be 'left', 'right' or 'bottom'.
// "dock": "right",
// // AI provider.
// "provider": null
// },
"collaboration_panel": {
"button": false
},
"preferences": {
"includeInlayParameterNameHints": "all",
"includeInlayParameterNameHintsWhenArgumentMatchesName": true,
"includeInlayFunctionParameterTypeHints": true,
"includeInlayVariableTypeHints": true,
"includeInlayVariableTypeHintsWhenTypeMatchesName": true,
"includeInlayPropertyDeclarationTypeHints": true,
"includeInlayFunctionLikeReturnTypeHints": true,
"includeInlayEnumMemberValueHints": true
},
"languages": {
"JavaScript": {
"code_actions_on_format": {
"source.fixAll.eslint": true
}
},
"TypeScript": {
"code_actions_on_format": {
"source.fixAll.eslint": true
}
}
},
"prettier": {
// Whether to consider prettier formatter or not when attempting to format a file.
"allowed": true,
//
// Use regular Prettier json configuration.
// If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
// the project has no other Prettier installed.
"plugins": [],
//
// Use regular Prettier json configuration.
// If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
// the project has no other Prettier installed.
"tabWidth": 2,
"bracketSpacing": true,
"trailingComma": "es5",
"semi": false,
"jsxSingleQuote": false,
"singleQuote": true
}
}
theme.mode
): 用于设置 UI 的主题模式。
system
: 使用与系统外观相对应的主题light
: 使用“light”字段指示的主题dark
: 使用“dark”字段指示的主题theme.light
): 设置为 One Light
。theme.dark
): 设置为 One Dark
。base_keymap
): 用于设置默认的键盘快捷键映射。
VSCode
Atom
JetBrains
None
SublimeText
TextMate
VSCode
。features.inline_completion_provider
): 用于设置内联补全提供者。
copilot
。buffer_font_family
): 用于渲染文本的字体,设置为 Zed Plex Mono
。buffer_font_fallbacks
): 当前未设置。buffer_font_features
): 配置字体的 OpenType 特性,当前未启用任何特性。buffer_font_size
): 设置为 15。buffer_font_weight
): 设置为 400。buffer_line_height
): 设置为 “comfortable”,适合阅读的行高 (1.618)。ui_font_family
): 用于渲染 UI 文本的字体,设置为 Zed Plex Sans
。ui_font_fallbacks
): 当前未设置。ui_font_features
): 配置 UI 文本的 OpenType 特性,禁用连字特性 (calt: false
)。ui_font_weight
): 设置为 400。ui_font_size
): 设置为 16。unnecessary_code_fade
): 设置为 0.3,表示代码未使用部分的淡化程度。active_pane_modifiers.magnification
): 设置为 1.0,表示活动面板与其他面板相同大小。active_pane_modifiers.border_size
): 设置为 0.0,表示没有边框。active_pane_modifiers.inactive_opacity
): 设置为 1.0,表示非活动面板完全不透明。pane_split_direction_horizontal
): 设置为 up
,表示水平面板分割时向上分割。pane_split_direction_vertical
): 设置为 left
,表示垂直面板分割时向左分割。centered_layout.left_padding
): 设置为 0.2,表示中央面板与工作区左侧的相对宽度。centered_layout.right_padding
): 设置为 0.2,表示中央面板与工作区右侧的相对宽度。multi_cursor_modifier
): 设置为 alt
,表示使用 Alt 键添加多个光标。vim_mode
): 设置为 false
,表示禁用 Vim 模式。hover_popover_enabled
): 设置为 true
,表示当鼠标移动到编辑器中的符号时显示信息框。confirm_quit
): 设置为 false
,表示关闭 Zed 时不进行确认。restore_on_startup
): 设置为 last_session
,表示打开 Zed 时恢复上次关闭的项目。drop_target_size
): 设置为 0.2,表示编辑器中拖放目标的大小比例。when_closing_with_no_tabs
): 设置为 platform_default
,表示根据当前平台的习惯来关闭窗口。use_system_path_prompts
): 设置为 true
,表示使用系统提供的文件打开和保存对话框。cursor_blink
): 设置为 true
,表示光标会闪烁。cursor_shape
): 当前未设置,默认使用竖线形光标。current_line_highlight
): 设置为 all
,表示高亮显示整行。show_completions_on_input
): 设置为 true
,表示在编辑时自动弹出补全菜单。show_completion_documentation
): 设置为 true
,表示在补全菜单中显示文档信息。completion_documentation_secondary_query_debounce
): 设置为 300 毫秒,表示在补全文档查询时的延迟时间。auto_signature_help
): 设置为 false
,表示不在括号内自动显示方法签名。show_signature_help_after_edits
): 设置为 false
,表示编辑后不会显示签名帮助。show_wrap_guides
): 设置为 true
,表示在编辑器中显示包裹引导线。wrap_guides
): 当前没有设置具体的包裹引导字符。redact_private_values
): 设置为 false
,表示不隐藏私有文件中的变量值。private_files
): 列出了匹配私有文件的 glob 模式,如 .env*
、.pem
、.key
等。use_on_type_format
): 设置为 true
,表示在输入触发符号后自动格式化代码。use_autoclose
): 设置为 true
,表示输入括号、引号等字符时自动添加匹配的闭合字符。use_auto_surround
): 设置为 true
,表示选中文本时自动添加括号、引号等包围符号。auto_indent_on_paste
): 设置为 true
,表示粘贴内容时自动调整缩进。always_treat_brackets_as_autoclosed
): 设置为 false
,表示只有自动插入的括号才会自动关闭。show_inline_completions
): 设置为 true
,表示立即显示内联补全。inline_completions_disabled_in
): 当前没有禁用内联补全的语言范围。show_whitespaces
): 设置为 selection
,表示仅在选中文本时显示空白字符。calls.mute_on_join
): 设置为 false
,表示加入通话时不自动静音。calls.share_on_join
): 设置为 false
,表示加入通话时不自动共享项目。breadcrumbs
): 设置为 true
,表示显示面包屑导航。quick_actions
): 设置为 true
,表示显示快速操作按钮。selections_menu
): 设置为 true
,表示在编辑器工具栏中显示选择菜单。scrollbar.show
): 设置为 auto
,表示根据需要显示滚动条,或遵循系统配置的行为。scrollbar.cursors
): 设置为 true
,表示在滚动条上显示光标位置。scrollbar.git_diff
): 设置为 true
,表示在滚动条上显示 Git diff 指示器。scrollbar.search_results
): 设置为 true
,表示在滚动条上显示搜索结果。scrollbar.selected_symbol
): 设置为 true
,表示在滚动条上显示选定符号的出现位置。scrollbar.diagnostics
): 设置为 true
,表示在滚动条上显示诊断指示器。middle_click_paste
): 设置为 true
,表示在 Linux 上启用中键粘贴功能。double_click_in_multibuffer
): 设置为 select
,表示在双击多缓冲区的片段时,选择整个单词。gutter.line_numbers
): 设置为 true
,表示在代码区显示行号。gutter.code_actions
): 设置为 true
,表示在代码区显示代码操作按钮。gutter.runnables
): 设置为 true
,表示在代码区显示可运行按钮。gutter.folds
): 设置为 true
,表示在代码区显示折叠按钮。indent_guides.enabled
): 设置为 true
,表示在编辑器中显示缩进指南。indent_guides.line_width
): 设置为 1
,表示缩进指南的宽度为 1 像素。indent_guides.active_line_width
): 设置为 1
,表示活动缩进指南的宽度为 1 像素。indent_guides.coloring
): 设置为 fixed
,表示缩进指南的颜色固定。indent_guides.background_coloring
): 设置为 disabled
,表示不为缩进指南的背景着色。scroll_beyond_last_line
): 设置为 one_page
,表示滚动到最后一行时会继续滚动一页。vertical_scroll_margin
): 设置为 3
,表示滚动时光标上方和下方各保留 3 行。scroll_sensitivity
): 设置为 1.0
,表示滚动的敏感度为默认值。relative_line_numbers
): 设置为 false
,表示不启用相对行号。search_wrap
): 设置为 true
,表示搜索结果会在文件末尾循环。search
):
whole_word
): 设置为 false
,表示搜索时不限制全词匹配。case_sensitive
): 设置为 false
,表示搜索时不区分大小写。include_ignored
): 设置为 false
,表示搜索时不包括忽略的文件。regex
): 设置为 false
,表示搜索时不启用正则表达式。seed_search_query_from_cursor
): 设置为 always
,表示始终根据光标下的文本填充搜索查询。use_smartcase_search
): 设置为 false
,表示不启用智能大小写搜索。inlay_hints.enabled
): 设置为 false
,表示禁用内嵌提示。inlay_hints.show_type_hints
): 设置为 true
,表示显示类型提示。inlay_hints.show_parameter_hints
): 设置为 true
,表示显示参数提示。inlay_hints.show_other_hints
): 设置为 true
,表示显示与 null
或 None
相关的提示。inlay_hints.show_background
): 设置为 false
,表示不显示内嵌提示的背景。inlay_hints.edit_debounce_ms
): 设置为 700
毫秒,表示在编辑缓冲区后等待 700 毫秒再请求提示。inlay_hints.scroll_debounce_ms
): 设置为 50
毫秒,表示在滚动缓冲区后等待 50 毫秒再请求提示。project_panel.button
): 设置为 true
,表示在状态栏中显示项目面板按钮。project_panel.default_width
): 设置为 240
,表示项目面板的默认宽度为 240 像素。project_panel.dock
): 设置为 left
,表示项目面板停靠在左侧。project_panel.file_icons
): 设置为 true
,表示在项目面板中显示文件图标。project_panel.folder_icons
): 设置为 true
,表示在项目面板中显示文件夹图标或文件夹展开箭头。project_panel.git_status
): 设置为 true
,表示在项目面板中显示 Git 状态。project_panel.indent_size
): 设置为 20
,表示嵌套项目的缩进为 20 像素。project_panel.auto_reveal_entries
): 设置为 true
,表示当某个项目条目变为活跃时,自动在项目面板中揭示该条目。project_panel.auto_fold_dirs
): 设置为 true
,表示当文件夹只包含一个子文件夹时,自动折叠该文件夹并显示紧凑的文件夹结构。project_panel.scrollbar.show
): 设置为 null
,表示继承编辑器的滚动条设置。project_panel.show_diagnostics
): 设置为 all
,表示在项目面板中标记所有包含错误或警告的文件。project_panel.indent_guides.show
): 设置为 always
,表示在项目面板中始终显示缩进指南。outline_panel
button
): 设置为 true
,表示在状态栏中显示大纲面板按钮。default_width
): 设置为 300
,表示大纲面板的默认宽度为 300 像素。dock
): 设置为 left
,表示大纲面板停靠在左侧。file_icons
): 设置为 true
,表示在大纲面板中显示文件图标。folder_icons
): 设置为 true
,表示在大纲面板中显示文件夹图标或箭头。git_status
): 设置为 true
,表示在大纲面板中显示 Git 状态。indent_size
): 设置为 20
,表示嵌套项目的缩进为 20 像素。auto_reveal_entries
): 设置为 true
,表示当某个大纲条目变为活跃时,自动在大纲面板中揭示该条目。auto_fold_dirs
): 设置为 true
,表示当文件夹只包含一个子文件夹时,自动折叠该文件夹并显示紧凑的文件夹结构。indent_guides.show
): 设置为 always
,表示在大纲面板中始终显示缩进指南。collaboration_panel
button
): 设置为 true
,表示在状态栏中显示协作面板按钮。dock
): 设置为 left
,表示协作面板停靠在左侧。default_width
): 设置为 240
,表示协作面板的默认宽度为 240 像素。chat_panel
button
): 设置为 true
,表示在状态栏中显示聊天面板按钮。dock
): 设置为 right
,表示聊天面板停靠在右侧。default_width
): 设置为 240
,表示聊天面板的默认宽度为 240 像素。message_editor
auto_replace_emoji_shortcode
): 设置为 true
,表示自动将表情符号短代码(例如 :wave:
)替换为表情符号字符(例如 👋
)。notification_panel
button
): 设置为 true
,表示在状态栏中显示通知面板按钮。dock
): 设置为 right
,表示通知面板停靠在右侧。default_width
): 设置为 380
,表示通知面板的默认宽度为 380 像素。assistant
version
): 设置为 "2"
,表示助手版本为 2。enabled
): 设置为 true
,表示启用助手。show_hints
): 设置为 true
,表示显示内联提示,指示如何使用内联助手和助手面板的键绑定。button
): 设置为 true
,表示在状态栏中显示助手面板按钮。dock
): 设置为 right
,表示助手面板停靠在右侧。default_width
): 设置为 640
,表示助手面板的默认宽度为 640 像素。default_height
): 设置为 320
,表示助手面板的默认高度为 320 像素。default_model
):
provider
): 设置为 "zed.dev"
,表示使用 Zed.dev 作为聊天模型的提供者。model
): 设置为 "claude-3-5-sonnet"
,表示使用 Claude 3.5 Sonnet 作为默认模型。slash_commands
/docs
命令 (docs
):
/docs
命令 (enabled
): 设置为 false
,表示禁用 /docs
命令。/project
命令 (project
):
/project
命令 (enabled
): 设置为 false
,表示禁用 /project
命令。show_call_status_icon
show_call_status_icon
): 设置为 true
,表示在操作系统状态栏中显示屏幕共享图标。enable_language_server
enable_language_server
): 设置为 true
,表示启用语言服务器来提供代码智能功能。linked_edits
linked_edits
): 设置为 true
,表示启用关联编辑功能。当编辑某个标签时,自动编辑其关联的标签(例如,修改 <html>
标签时,自动修改 </html>
标签的内容)。language_servers
language_servers
): 此项允许根据语言自定义启用或禁用的语言服务器。此处列出了一个空数组 ["..."]
,需要根据实际需求填写。autosave
autosave
):
off
,表示关闭自动保存功能。tab_bar
show
): 设置为 true
,表示在编辑器中显示标签栏。show_nav_history_buttons
): 设置为 true
,表示显示导航历史按钮。tabs
git_status
): 设置为 false
,表示不在标签中显示 Git 状态颜色。close_position
): 设置为 right
,表示关闭按钮放在标签的右侧。file_icons
): 设置为 false
,表示不在标签中显示文件图标。activate_on_close
): 设置为 history
,表示关闭当前标签后,激活之前打开的标签。preview_tabs
enabled
): 设置为 true
,表示启用预览标签。预览标签可以在切换到另一个文件时自动关闭,除非明确将其固定。enable_preview_from_file_finder
): 设置为 false
,表示在文件查找器中选择文件时不会自动启用预览模式。enable_preview_from_code_navigation
): 设置为 false
,表示在代码导航时不会替换当前的预览标签。file_finder
file_icons
): 设置为 true
,表示在文件查找器中显示文件图标。modal_max_width
): 设置为 small
,表示文件查找器占用较小的窗口宽度。remove_trailing_whitespace_on_save
): 设置为 true
,表示在保存文件时,移除行尾的空白字符。extend_comment_on_newline
): 设置为 true
,表示如果前一行是注释,新行将自动以注释开始。ensure_final_newline_on_save
): 设置为 true
,表示在保存时确保文件末尾有一个换行符。format_on_save
): 设置为 on
,表示在保存文件时执行格式化操作。formatter
formatter
):
auto
): 默认设置,Zed 使用其内置的 Prettier 集成进行格式化,如果适用,则使用语言服务器格式化代码。soft_wrap
soft_wrap
):
none
,表示不自动软换行长行文本。editor_width
:根据编辑器的宽度进行软换行。preferred_line_length
:根据首选的行长度进行软换行。bounded
:根据首选行长度或编辑器宽度(取其较小者)进行软换行。preferred_line_length
preferred_line_length
): 设置为 80
,表示在软换行时,行长度限制为 80 列。hard_tabs
hard_tabs
): 设置为 false
,表示使用空格进行缩进,而不是制表符。tab_size
tab_size
): 设置为 4
,表示每个制表符占用 4 列空间。telemetry
telemetry
):
diagnostics
): 设置为 true
,表示发送调试信息,如崩溃报告。metrics
): 设置为 true
,表示发送匿名化的使用数据,如所使用的编程语言。auto_update
auto_update
): 设置为 true
,表示启用 Zed 的自动更新功能。diagnostics
include_warnings
): 设置为 true
,表示默认显示警告信息。file_scan_exclusions
file_scan_exclusions
): 定义一个数组,列出了在文件系统扫描、文件树和文件搜索中需要排除的文件。例如,.git
、.DS_Store
等文件或目录将被排除。git
git
):
git_gutter
): 设置为 tracked_files
,表示仅在已跟踪的文件中显示 Git 栅栏(显示文件的变更)。inline_blame
): 设置为 true
,表示在当前行显示 Git blame 信息,便于查看当前行的代码作者和提交信息。load_direnv
load_direnv
):
direct
,表示直接使用 direnv export json
加载 Direnv 配置。inline_completions
disabled_globs
): 配置了一个文件类型列表,.env
文件类型中的内联补全被禁用。journal
path
): 日志条目将存储在指定的目录,默认为用户的家目录 (~
)。hour_format
): 配置小时的显示格式:
hour12
: 使用 12 小时制显示。hour24
: 使用 24 小时制显示。terminal
shell
): 配置使用的 shell。
system
: 使用系统默认终端配置。program
: 使用指定的程序作为 shell。with_arguments
: 使用指定的程序及其参数作为 shell。dock
): 配置终端面板停靠的位置,可以是 left
、right
或 bottom
。default_width
): 终端停靠在左或右时的默认宽度。default_height
): 终端停靠在底部时的默认高度。working_directory
): 配置启动终端时使用的工作目录。
current_project_directory
: 使用当前文件所在项目的目录。first_project_directory
: 使用工作区中的第一个项目目录。always_home
: 总是使用平台的主目录。always
: 使用指定的路径。blinking
): 配置光标是否闪烁。
off
: 禁止光标闪烁。terminal_controlled
: 允许终端控制光标闪烁。on
: 强制光标闪烁。cursor_shape
): 配置光标的形状,可以是 block
、bar
、underline
或 hollow
。alternate_scroll
): 配置备用滚动模式是否开启。
on
: 启用备用滚动模式。off
: 禁用备用滚动模式。option_as_meta
): 配置选项键是否作为 Meta 键使用。
false
: 默认平台行为。true
: 将选项键作为 Meta 键。copy_on_select
): 配置选择文本时是否自动复制到系统剪贴板。button
): 配置是否在状态栏中显示终端按钮。env
): 可以向终端环境中添加键值对。line_height
): 配置终端的行高。
comfortable
: 使用适合阅读的行高(1.618)。standard
: 使用标准行高(1.3),适用于 TUI。custom
: 使用自定义行高。detect_venv
): 配置是否在工作目录中检测并激活 Python 虚拟环境。toolbar
): 配置是否显示终端的标题。font_size
): 默认为 15,如果未设置,终端将匹配缓冲区的字体大小。font_family
): 默认为 Zed Plex Mono
,如果未设置,终端将匹配缓冲区的字体。font_fallbacks
): 默认为 FiraCode Nerd Fonts
,如果未设置,终端将匹配缓冲区的字体回退。max_scroll_history_lines
): 默认为 10000,最大值为 100000,设置为 0 时禁用滚动。tasks.variables
): 用于定义任务中的变量。txt
): 纯文本文件。**/.zed/**/*.json
, **/zed/**/*.json
, **/Zed/**/*.json
): 用于 JSONC 格式的文件。.env.*
): 用于 Shell 脚本相关的文件。node
): 用于设置 Node.js 的路径和版本。
ignore_system_version
): 如果设置为 true,将下载并安装独立版本的 Node。auto_install_extensions
): 在启动时自动安装指定扩展,当前设置为 html
。astro-language-server
,允许使用 prettier-plugin-astro
格式化。vtsls
语言服务器,允许使用 Prettier 进行格式化。phpactor
语言服务器,允许使用 Prettier 进行格式化并支持 @prettier/plugin-php
。vue-language-server
,允许使用 Prettier 进行格式化。https://api.anthropic.com
。https://generativelanguage.googleapis.com
。http://localhost:11434
。https://api.openai.com/v1
。allowed
): 是否允许使用 Prettier 进行文件格式化,默认为 false
,如果启用,Zed 会使用指定的 Prettier 配置。plugins
): 指定 Prettier 插件,若没有项目级别的 Prettier 安装,Zed 会使用默认配置。trailingComma
, tabWidth
, semi
, singleQuote
): 配置 Prettier 格式化的行为,支持设置尾逗号、制表符宽度、分号使用以及单引号。rust-analyzer
配置初始化选项。enabled
): 是否启用 Jupyter 支持,默认为 true
。kernel_selections
): 可配置特定语言使用的 Jupyter 内核。toggle_relative_line_numbers
): 是否启用相对行号,默认为 false
。use_system_clipboard
): 配置剪贴板的使用,默认为 always
。use_multiline_find
): 是否启用多行查找,默认为 false
。use_smartcase_find
): 是否启用智能查找,默认为 false
。server_url
): 设置 Zed 连接的服务器 URL,默认值为 https://zed.dev
。preview
)、夜间版本 (nightly
)、稳定版本 (stable
)、开发版本 (dev
): 用于覆盖不同版本的 Zed 的配置,如主题等。show_status_indicator
): 是否在状态栏显示任务状态指示器,默认值为 true
。line_indicator_format
): 配置显示行指示器时使用的格式。可选值为 short
或 long
,默认为 long
。proxy
): 配置 Zed 使用的代理,可以指定代理协议(如 http
、https
、socks5
等)。command_aliases
): 配置命令面板中命令的别名,用户输入别名时会被替换为实际命令。ssh_connections
): 配置 Zed 使用的 SSH 连接,可以通过命令面板中的 Open Remote
打开远程项目。context_servers
): 配置供助手使用的上下文服务器。json{
// The name of the Zed theme to use for the UI.
//
// `mode` is one of:
// - "system": Use the theme that corresponds to the system's appearance
// - "light": Use the theme indicated by the "light" field
// - "dark": Use the theme indicated by the "dark" field
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark"
},
// The name of a base set of key bindings to use.
// This setting can take four values, each named after another
// text editor:
//
// 1. "VSCode"
// 2. "Atom"
// 3. "JetBrains"
// 4. "None"
// 5. "SublimeText"
// 6. "TextMate"
"base_keymap": "VSCode",
// Features that can be globally enabled or disabled
"features": {
// Which inline completion provider to use.
"inline_completion_provider": "copilot"
},
// The name of a font to use for rendering text in the editor
"buffer_font_family": "Zed Plex Mono",
// Set the buffer text's font fallbacks, this will be merged with
// the platform's default fallbacks.
"buffer_font_fallbacks": null,
// The OpenType features to enable for text in the editor.
"buffer_font_features": {
// Disable ligatures:
// "calt": false
},
// The default font size for text in the editor
"buffer_font_size": 15,
// The weight of the editor font in standard CSS units from 100 to 900.
"buffer_font_weight": 400,
// Set the buffer's line height.
// May take 3 values:
// 1. Use a line height that's comfortable for reading (1.618)
// "buffer_line_height": "comfortable"
// 2. Use a standard line height, (1.3)
// "buffer_line_height": "standard",
// 3. Use a custom line height
// "buffer_line_height": {
// "custom": 2
// },
"buffer_line_height": "comfortable",
// The name of a font to use for rendering text in the UI
// You can set this to ".SystemUIFont" to use the system font
"ui_font_family": "Zed Plex Sans",
// Set the UI's font fallbacks, this will be merged with the platform's
// default font fallbacks.
"ui_font_fallbacks": null,
// The OpenType features to enable for text in the UI
"ui_font_features": {
// Disable ligatures:
"calt": false
},
// The weight of the UI font in standard CSS units from 100 to 900.
"ui_font_weight": 400,
// The default font size for text in the UI
"ui_font_size": 16,
// How much to fade out unused code.
"unnecessary_code_fade": 0.3,
// Active pane styling settings.
"active_pane_modifiers": {
// The factor to grow the active pane by. Defaults to 1.0
// which gives the same size as all other panes.
"magnification": 1.0,
// Inset border size of the active pane, in pixels.
"border_size": 0.0,
// Opacity of the inactive panes. 0 means transparent, 1 means opaque.
// Values are clamped to the [0.0, 1.0] range.
"inactive_opacity": 1.0
},
// The direction that you want to split panes horizontally. Defaults to "up"
"pane_split_direction_horizontal": "up",
// The direction that you want to split panes horizontally. Defaults to "left"
"pane_split_direction_vertical": "left",
// Centered layout related settings.
"centered_layout": {
// The relative width of the left padding of the central pane from the
// workspace when the centered layout is used.
"left_padding": 0.2,
// The relative width of the right padding of the central pane from the
// workspace when the centered layout is used.
"right_padding": 0.2
},
// The key to use for adding multiple cursors
// Currently "alt" or "cmd_or_ctrl" (also aliased as
// "cmd" and "ctrl") are supported.
"multi_cursor_modifier": "alt",
// Whether to enable vim modes and key bindings.
"vim_mode": false,
// Whether to show the informational hover box when moving the mouse
// over symbols in the editor.
"hover_popover_enabled": true,
// Whether to confirm before quitting Zed.
"confirm_quit": false,
// Whether to restore last closed project when fresh Zed instance is opened.
"restore_on_startup": "last_session",
// Size of the drop target in the editor.
"drop_target_size": 0.2,
// Whether the window should be closed when using 'close active item' on a window with no tabs.
// May take 3 values:
// 1. Use the current platform's convention
// "when_closing_with_no_tabs": "platform_default"
// 2. Always close the window:
// "when_closing_with_no_tabs": "close_window",
// 3. Never close the window
// "when_closing_with_no_tabs": "keep_window_open",
"when_closing_with_no_tabs": "platform_default",
// Whether to use the system provided dialogs for Open and Save As.
// When set to false, Zed will use the built-in keyboard-first pickers.
"use_system_path_prompts": true,
// Whether the cursor blinks in the editor.
"cursor_blink": true,
// Cursor shape for the default editor.
// 1. A vertical bar
// "bar"
// 2. A block that surrounds the following character
// "block"
// 3. An underline / underscore that runs along the following character
// "underline"
// 4. A box drawn around the following character
// "hollow"
//
// Default: not set, defaults to "bar"
"cursor_shape": null,
// How to highlight the current line in the editor.
//
// 1. Don't highlight the current line:
// "none"
// 2. Highlight the gutter area:
// "gutter"
// 3. Highlight the editor area:
// "line"
// 4. Highlight the full line (default):
// "all"
"current_line_highlight": "all",
// Whether to pop the completions menu while typing in an editor without
// explicitly requesting it.
"show_completions_on_input": true,
// Whether to display inline and alongside documentation for items in the
// completions menu
"show_completion_documentation": true,
// The debounce delay before re-querying the language server for completion
// documentation when not included in original completion list.
"completion_documentation_secondary_query_debounce": 300,
// Show method signatures in the editor, when inside parentheses.
"auto_signature_help": false,
/// Whether to show the signature help after completion or a bracket pair inserted.
/// If `auto_signature_help` is enabled, this setting will be treated as enabled also.
"show_signature_help_after_edits": false,
// Whether to show wrap guides (vertical rulers) in the editor.
// Setting this to true will show a guide at the 'preferred_line_length' value
// if 'soft_wrap' is set to 'preferred_line_length', and will show any
// additional guides as specified by the 'wrap_guides' setting.
"show_wrap_guides": true,
// Character counts at which to show wrap guides in the editor.
"wrap_guides": [],
// Hide the values of in variables from visual display in private files
"redact_private_values": false,
// The default number of lines to expand excerpts in the multibuffer by.
"expand_excerpt_lines": 3,
// Globs to match against file paths to determine if a file is private.
"private_files": [
"**/.env*",
"**/*.pem",
"**/*.key",
"**/*.cert",
"**/*.crt",
"**/secrets.yml"
],
// Whether to use additional LSP queries to format (and amend) the code after
// every "trigger" symbol input, defined by LSP server capabilities.
"use_on_type_format": true,
// Whether to automatically add matching closing characters when typing
// opening parenthesis, bracket, brace, single or double quote characters.
// For example, when you type (, Zed will add a closing ) at the correct position.
"use_autoclose": true,
// Whether to automatically surround selected text when typing opening parenthesis,
// bracket, brace, single or double quote characters.
// For example, when you select text and type (, Zed will surround the text with ().
"use_auto_surround": true,
// Whether indentation of pasted content should be adjusted based on the context.
"auto_indent_on_paste": true,
// Controls how the editor handles the autoclosed characters.
// When set to `false`(default), skipping over and auto-removing of the closing characters
// happen only for auto-inserted characters.
// Otherwise(when `true`), the closing characters are always skipped over and auto-removed
// no matter how they were inserted.
"always_treat_brackets_as_autoclosed": false,
// Controls whether inline completions are shown immediately (true)
// or manually by triggering `editor::ShowInlineCompletion` (false).
"show_inline_completions": true,
// Controls whether inline completions are shown in a given language scope.
// Example: ["string", "comment"]
"inline_completions_disabled_in": [],
// Whether to show tabs and spaces in the editor.
// This setting can take three values:
//
// 1. Draw tabs and spaces only for the selected text (default):
// "selection"
// 2. Do not draw any tabs or spaces:
// "none"
// 3. Draw all invisible symbols:
// "all"
// 4. Draw whitespaces at boundaries only:
// "boundary"
// For a whitespace to be on a boundary, any of the following conditions need to be met:
// - It is a tab
// - It is adjacent to an edge (start or end)
// - It is adjacent to a whitespace (left or right)
"show_whitespaces": "selection",
// Settings related to calls in Zed
"calls": {
// Join calls with the microphone live by default
"mute_on_join": false,
// Share your project when you are the first to join a channel
"share_on_join": false
},
// Toolbar related settings
"toolbar": {
// Whether to show breadcrumbs.
"breadcrumbs": true,
// Whether to show quick action buttons.
"quick_actions": true,
// Whether to show the Selections menu in the editor toolbar
"selections_menu": true
},
// Scrollbar related settings
"scrollbar": {
// When to show the scrollbar in the editor.
// This setting can take four values:
//
// 1. Show the scrollbar if there's important information or
// follow the system's configured behavior (default):
// "auto"
// 2. Match the system's configured behavior:
// "system"
// 3. Always show the scrollbar:
// "always"
// 4. Never show the scrollbar:
// "never"
"show": "auto",
// Whether to show cursor positions in the scrollbar.
"cursors": true,
// Whether to show git diff indicators in the scrollbar.
"git_diff": true,
// Whether to show buffer search results in the scrollbar.
"search_results": true,
// Whether to show selected symbol occurrences in the scrollbar.
"selected_symbol": true,
// Whether to show diagnostic indicators in the scrollbar.
"diagnostics": true
},
// Enable middle-click paste on Linux.
"middle_click_paste": true,
// What to do when multibuffer is double clicked in some of its excerpts
// (parts of singleton buffers).
// May take 2 values:
// 1. Behave as a regular buffer and select the whole word (default).
// "double_click_in_multibuffer": "select"
// 2. Open the excerpt clicked as a new buffer in the new tab.
// "double_click_in_multibuffer": "open",
// For the case of "open", regular selection behavior can be achieved by holding `alt` when double clicking.
"double_click_in_multibuffer": "select",
"gutter": {
// Whether to show line numbers in the gutter.
"line_numbers": true,
// Whether to show code action buttons in the gutter.
"code_actions": true,
// Whether to show runnables buttons in the gutter.
"runnables": true,
// Whether to show fold buttons in the gutter.
"folds": true
},
"indent_guides": {
/// Whether to show indent guides in the editor.
"enabled": true,
/// The width of the indent guides in pixels, between 1 and 10.
"line_width": 1,
/// The width of the active indent guide in pixels, between 1 and 10.
"active_line_width": 1,
/// Determines how indent guides are colored.
/// This setting can take the following three values:
///
/// 1. "disabled"
/// 2. "fixed"
/// 3. "indent_aware"
"coloring": "fixed",
/// Determines how indent guide backgrounds are colored.
/// This setting can take the following two values:
///
/// 1. "disabled"
/// 2. "indent_aware"
"background_coloring": "disabled"
},
// Whether the editor will scroll beyond the last line.
"scroll_beyond_last_line": "one_page",
// The number of lines to keep above/below the cursor when scrolling.
"vertical_scroll_margin": 3,
// Scroll sensitivity multiplier. This multiplier is applied
// to both the horizontal and vertical delta values while scrolling.
"scroll_sensitivity": 1.0,
"relative_line_numbers": false,
// If 'search_wrap' is disabled, search result do not wrap around the end of the file.
"search_wrap": true,
// Search options to enable by default when opening new project and buffer searches.
"search": {
"whole_word": false,
"case_sensitive": false,
"include_ignored": false,
"regex": false
},
// When to populate a new search's query based on the text under the cursor.
// This setting can take the following three values:
//
// 1. Always populate the search query with the word under the cursor (default).
// "always"
// 2. Only populate the search query when there is text selected
// "selection"
// 3. Never populate the search query
// "never"
"seed_search_query_from_cursor": "always",
"use_smartcase_search": false,
// Inlay hint related settings
"inlay_hints": {
// Global switch to toggle hints on and off, switched off by default.
"enabled": false,
// Toggle certain types of hints on and off, all switched on by default.
"show_type_hints": true,
"show_parameter_hints": true,
// Corresponds to null/None LSP hint type value.
"show_other_hints": true,
// Whether to show a background for inlay hints.
//
// If set to `true`, the background will use the `hint.background` color from the current theme.
"show_background": false,
// Time to wait after editing the buffer, before requesting the hints,
// set to 0 to disable debouncing.
"edit_debounce_ms": 700,
// Time to wait after scrolling the buffer, before requesting the hints,
// set to 0 to disable debouncing.
"scroll_debounce_ms": 50
},
"project_panel": {
// Whether to show the project panel button in the status bar
"button": true,
// Default width of the project panel.
"default_width": 240,
// Where to dock the project panel. Can be 'left' or 'right'.
"dock": "left",
// Whether to show file icons in the project panel.
"file_icons": true,
// Whether to show folder icons or chevrons for directories in the project panel.
"folder_icons": true,
// Whether to show the git status in the project panel.
"git_status": true,
// Amount of indentation for nested items.
"indent_size": 20,
// Whether to reveal it in the project panel automatically,
// when a corresponding project entry becomes active.
// Gitignored entries are never auto revealed.
"auto_reveal_entries": true,
// Whether to fold directories automatically and show compact folders
// (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
"auto_fold_dirs": true,
/// Scrollbar-related settings
"scrollbar": {
/// When to show the scrollbar in the project panel.
/// This setting can take four values:
///
/// 1. null (default): Inherit editor settings
/// 2. Show the scrollbar if there's important information or
/// follow the system's configured behavior (default):
/// "auto"
/// 3. Match the system's configured behavior:
/// "system"
/// 4. Always show the scrollbar:
/// "always"
/// 5. Never show the scrollbar:
/// "never"
"show": null
},
/// Which files containing diagnostic errors/warnings to mark in the project panel.
/// This setting can take the following three values:
///
/// 1. Do not mark any files:
/// "off"
/// 2. Only mark files with errors:
/// "errors"
/// 3. Mark files with errors and warnings:
/// "all"
"show_diagnostics": "all",
// Settings related to indent guides in the project panel.
"indent_guides": {
// When to show indent guides in the project panel.
// This setting can take two values:
//
// 1. Always show indent guides:
// "always"
// 2. Never show indent guides:
// "never"
"show": "always"
}
},
"outline_panel": {
// Whether to show the outline panel button in the status bar
"button": true,
// Default width of the outline panel.
"default_width": 300,
// Where to dock the outline panel. Can be 'left' or 'right'.
"dock": "left",
// Whether to show file icons in the outline panel.
"file_icons": true,
// Whether to show folder icons or chevrons for directories in the outline panel.
"folder_icons": true,
// Whether to show the git status in the outline panel.
"git_status": true,
// Amount of indentation for nested items.
"indent_size": 20,
// Whether to reveal it in the outline panel automatically,
// when a corresponding outline entry becomes active.
// Gitignored entries are never auto revealed.
"auto_reveal_entries": true,
/// Whether to fold directories automatically
/// when a directory has only one directory inside.
"auto_fold_dirs": true,
// Settings related to indent guides in the outline panel.
"indent_guides": {
// When to show indent guides in the outline panel.
// This setting can take two values:
//
// 1. Always show indent guides:
// "always"
// 2. Never show indent guides:
// "never"
"show": "always"
},
/// Scrollbar-related settings
"scrollbar": {
/// When to show the scrollbar in the project panel.
/// This setting can take four values:
///
/// 1. null (default): Inherit editor settings
/// 2. Show the scrollbar if there's important information or
/// follow the system's configured behavior (default):
/// "auto"
/// 3. Match the system's configured behavior:
/// "system"
/// 4. Always show the scrollbar:
/// "always"
/// 5. Never show the scrollbar:
/// "never"
"show": null
}
},
"collaboration_panel": {
// Whether to show the collaboration panel button in the status bar.
"button": true,
// Where to dock the collaboration panel. Can be 'left' or 'right'.
"dock": "left",
// Default width of the collaboration panel.
"default_width": 240
},
"chat_panel": {
// Whether to show the chat panel button in the status bar.
"button": true,
// Where to the chat panel. Can be 'left' or 'right'.
"dock": "right",
// Default width of the chat panel.
"default_width": 240
},
"message_editor": {
// Whether to automatically replace emoji shortcodes with emoji characters.
// For example: typing `:wave:` gets replaced with `👋`.
"auto_replace_emoji_shortcode": true
},
"notification_panel": {
// Whether to show the notification panel button in the status bar.
"button": true,
// Where to dock the notification panel. Can be 'left' or 'right'.
"dock": "right",
// Default width of the notification panel.
"default_width": 380
},
"assistant": {
// Version of this setting.
"version": "2",
// Whether the assistant is enabled.
"enabled": true,
// Whether to show inline hints showing the keybindings to use the inline assistant and the
// assistant panel.
"show_hints": true,
// Whether to show the assistant panel button in the status bar.
"button": true,
// Where to dock the assistant panel. Can be 'left', 'right' or 'bottom'.
"dock": "right",
// Default width when the assistant is docked to the left or right.
"default_width": 640,
// Default height when the assistant is docked to the bottom.
"default_height": 320,
// The default model to use when creating new chats.
"default_model": {
// The provider to use.
"provider": "zed.dev",
// The model to use.
"model": "claude-3-5-sonnet"
}
},
// The settings for slash commands.
"slash_commands": {
// Settings for the `/docs` slash command.
"docs": {
// Whether `/docs` is enabled.
"enabled": false
},
// Settings for the `/project` slash command.
"project": {
// Whether `/project` is enabled.
"enabled": false
}
},
// Whether the screen sharing icon is shown in the os status bar.
"show_call_status_icon": true,
// Whether to use language servers to provide code intelligence.
"enable_language_server": true,
// Whether to perform linked edits of associated ranges, if the language server supports it.
// For example, when editing opening <html> tag, the contents of the closing </html> tag will be edited as well.
"linked_edits": true,
// The list of language servers to use (or disable) for all languages.
//
// This is typically customized on a per-language basis.
"language_servers": ["..."],
// When to automatically save edited buffers. This setting can
// take four values.
//
// 1. Never automatically save:
// "autosave": "off",
// 2. Save when changing focus away from the Zed window:
// "autosave": "on_window_change",
// 3. Save when changing focus away from a specific buffer:
// "autosave": "on_focus_change",
// 4. Save when idle for a certain amount of time:
// "autosave": { "after_delay": {"milliseconds": 500} },
"autosave": "off",
// Settings related to the editor's tab bar.
"tab_bar": {
// Whether or not to show the tab bar in the editor
"show": true,
// Whether or not to show the navigation history buttons.
"show_nav_history_buttons": true
},
// Settings related to the editor's tabs
"tabs": {
// Show git status colors in the editor tabs.
"git_status": false,
// Position of the close button on the editor tabs.
"close_position": "right",
// Whether to show the file icon for a tab.
"file_icons": false,
// What to do after closing the current tab.
//
// 1. Activate the tab that was open previously (default)
// "History"
// 2. Activate the neighbour tab (prefers the right one, if present)
// "Neighbour"
"activate_on_close": "history"
},
// Settings related to preview tabs.
"preview_tabs": {
// Whether preview tabs should be enabled.
// Preview tabs allow you to open files in preview mode, where they close automatically
// when you switch to another file unless you explicitly pin them.
// This is useful for quickly viewing files without cluttering your workspace.
"enabled": true,
// Whether to open tabs in preview mode when selected from the file finder.
"enable_preview_from_file_finder": false,
// Whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
"enable_preview_from_code_navigation": false
},
// Settings related to the file finder.
"file_finder": {
// Whether to show file icons in the file finder.
"file_icons": true,
// Determines how much space the file finder can take up in relation to the available window width.
// There are 5 possible width values:
//
// 1. Small: This value is essentially a fixed width.
// "modal_width": "small"
// 2. Medium:
// "modal_width": "medium"
// 3. Large:
// "modal_width": "large"
// 4. Extra Large:
// "modal_width": "xlarge"
// 5. Fullscreen: This value removes any horizontal padding, as it consumes the whole viewport width.
// "modal_width": "full"
//
// Default: small
"modal_max_width": "small"
},
// Whether or not to remove any trailing whitespace from lines of a buffer
// before saving it.
"remove_trailing_whitespace_on_save": true,
// Whether to start a new line with a comment when a previous line is a comment as well.
"extend_comment_on_newline": true,
// Whether or not to ensure there's a single newline at the end of a buffer
// when saving it.
"ensure_final_newline_on_save": true,
// Whether or not to perform a buffer format before saving
//
// Keep in mind, if the autosave with delay is enabled, format_on_save will be ignored
"format_on_save": "on",
// How to perform a buffer format. This setting can take 4 values:
//
// 1. Format code using the current language server:
// "formatter": "language_server"
// 2. Format code using an external command:
// "formatter": {
// "external": {
// "command": "prettier",
// "arguments": ["--stdin-filepath", "{buffer_path}"]
// }
// }
// 3. Format code using Zed's Prettier integration:
// "formatter": "prettier"
// 4. Default. Format files using Zed's Prettier integration (if applicable),
// or falling back to formatting via language server:
// "formatter": "auto"
"formatter": "auto",
// How to soft-wrap long lines of text.
// Possible values:
//
// 1. Prefer a single line generally, unless an overly long line is encountered.
// "soft_wrap": "none",
// "soft_wrap": "prefer_line", // (deprecated, same as "none")
// 2. Soft wrap lines that overflow the editor.
// "soft_wrap": "editor_width",
// 3. Soft wrap lines at the preferred line length.
// "soft_wrap": "preferred_line_length",
// 4. Soft wrap lines at the preferred line length or the editor width (whichever is smaller).
// "soft_wrap": "bounded",
"soft_wrap": "none",
// The column at which to soft-wrap lines, for buffers where soft-wrap
// is enabled.
"preferred_line_length": 80,
// Whether to indent lines using tab characters, as opposed to multiple
// spaces.
"hard_tabs": false,
// How many columns a tab should occupy.
"tab_size": 4,
// Control what info is collected by Zed.
"telemetry": {
// Send debug info like crash reports.
"diagnostics": true,
// Send anonymized usage data like what languages you're using Zed with.
"metrics": true
},
// Automatically update Zed. This setting may be ignored on Linux if
// installed through a package manager.
"auto_update": true,
// Diagnostics configuration.
"diagnostics": {
// Whether to show warnings or not by default.
"include_warnings": true
},
// Add files or globs of files that will be excluded by Zed entirely:
// they will be skipped during FS scan(s), file tree and file search
// will lack the corresponding file entries.
"file_scan_exclusions": [
"**/.git",
"**/.svn",
"**/.hg",
"**/CVS",
"**/.DS_Store",
"**/Thumbs.db",
"**/.classpath",
"**/.settings"
],
// Git gutter behavior configuration.
"git": {
// Control whether the git gutter is shown. May take 2 values:
// 1. Show the gutter
// "git_gutter": "tracked_files"
// 2. Hide the gutter
// "git_gutter": "hide"
"git_gutter": "tracked_files",
// Control whether the git blame information is shown inline,
// in the currently focused line.
"inline_blame": {
"enabled": true
// Sets a delay after which the inline blame information is shown.
// Delay is restarted with every cursor movement.
// "delay_ms": 600
//
// Whether or not do display the git commit summary on the same line.
// "show_commit_summary": false
//
// The minimum column number to show the inline blame information at
// "min_column": 0
}
},
// Configuration for how direnv configuration should be loaded. May take 2 values:
// 1. Load direnv configuration using `direnv export json` directly.
// "load_direnv": "direct"
// 2. Load direnv configuration through the shell hook, works for POSIX shells and fish.
// "load_direnv": "shell_hook"
"load_direnv": "direct",
"inline_completions": {
// A list of globs representing files that inline completions should be disabled for.
"disabled_globs": [".env"]
},
// Settings specific to journaling
"journal": {
// The path of the directory where journal entries are stored
"path": "~",
// What format to display the hours in
// May take 2 values:
// 1. hour12
// 2. hour24
"hour_format": "hour12"
},
// Settings specific to the terminal
"terminal": {
// What shell to use when opening a terminal. May take 3 values:
// 1. 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",
// Where to dock terminals panel. Can be `left`, `right`, `bottom`.
"dock": "bottom",
// Default width when the terminal is docked to the left or right.
"default_width": 640,
// Default height when the terminal is docked to the bottom.
"default_height": 320,
// What working directory to use when launching the terminal.
// May take 4 values:
// 1. Use the current file's project directory. Will Fallback to the
// first project directory strategy if unsuccessful
// "working_directory": "current_project_directory"
// 2. Use the first project in this workspace's directory
// "working_directory": "first_project_directory"
// 3. Always use this platform's home directory (if we can find it)
// "working_directory": "always_home"
// 4. Always use a specific directory. This value will be shell expanded.
// If this path is not a valid directory the terminal will default to
// this platform's home directory (if we can find it)
// "working_directory": {
// "always": {
// "directory": "~/zed/projects/"
// }
// }
"working_directory": "current_project_directory",
// Set the cursor blinking behavior in the terminal.
// May take 3 values:
// 1. Never blink the cursor, ignoring the terminal mode
// "blinking": "off",
// 2. Default the cursor blink to off, but allow the terminal to
// set blinking
// "blinking": "terminal_controlled",
// 3. Always blink the cursor, ignoring the terminal mode
// "blinking": "on",
"blinking": "terminal_controlled",
// Default cursor shape for the terminal.
// 1. A block that surrounds the following character
// "block"
// 2. A vertical bar
// "bar"
// 3. An underline / underscore that runs along the following character
// "underline"
// 4. A box drawn around the following character
// "hollow"
//
// Default: not set, defaults to "block"
"cursor_shape": null,
// Set whether Alternate Scroll mode (code: ?1007) is active by default.
// Alternate Scroll mode converts mouse scroll events into up / down key
// presses when in the alternate screen (e.g. when running applications
// like vim or less). The terminal can still set and unset this mode.
// May take 2 values:
// 1. Default alternate scroll mode to on
// "alternate_scroll": "on",
// 2. Default alternate scroll mode to off
// "alternate_scroll": "off",
"alternate_scroll": "off",
// Set whether the option key behaves as the meta key.
// May take 2 values:
// 1. Rely on default platform handling of option key, on macOS
// this means generating certain unicode characters
// "option_as_meta": false,
// 2. Make the option keys behave as a 'meta' key, e.g. for emacs
// "option_as_meta": true,
"option_as_meta": false,
// Whether or not selecting text in the terminal will automatically
// copy to the system clipboard.
"copy_on_select": false,
// Whether to show the terminal button in the status bar
"button": true,
// Any key-value pairs added to this list will be added to the terminal's
// environment. Use `:` to separate multiple values.
"env": {
// "KEY": "value1:value2"
},
// Set the terminal's line height.
// May take 3 values:
// 1. Use a line height that's comfortable for reading, 1.618
// "line_height": "comfortable"
// 2. Use a standard line height, 1.3. This option is useful for TUIs,
// particularly if they use box characters
// "line_height": "standard",
// 3. Use a custom line height.
// "line_height": {
// "custom": 2
// },
"line_height": "comfortable",
// Activate the python virtual environment, if one is found, in the
// terminal's working directory (as resolved by the working_directory
// setting). Set this to "off" to disable this behavior.
"detect_venv": {
"on": {
// Default directories to search for virtual environments, relative
// to the current working directory. We recommend overriding this
// in your project's settings, rather than globally.
"directories": [".env", "env", ".venv", "venv"],
// Can also be `csh`, `fish`, `nushell` and `power_shell`
"activate_script": "default"
}
},
"toolbar": {
// Whether to display the terminal title in its toolbar.
"title": true
}
// Set the terminal's font size. If this option is not included,
// the terminal will default to matching the buffer's font size.
// "font_size": 15,
// Set the terminal's font family. If this option is not included,
// the terminal will default to matching the buffer's font family.
// "font_family": "Zed Plex Mono",
// Set the terminal's font fallbacks. If this option is not included,
// the terminal will default to matching the buffer's font fallbacks.
// This will be merged with the platform's default font fallbacks
// "font_fallbacks": ["FiraCode Nerd Fonts"],
// Sets the maximum number of lines in the terminal's scrollback buffer.
// Default: 10_000, maximum: 100_000 (all bigger values set will be treated as 100_000), 0 disables the scrolling.
// Existing terminals will not pick up this change until they are recreated.
// "max_scroll_history_lines": 10000,
},
"code_actions_on_format": {},
/// Settings related to running tasks.
"tasks": {
"variables": {}
},
// An object whose keys are language names, and whose values
// are arrays of filenames or extensions of files that should
// use those languages.
//
// For example, to treat files like `foo.notjs` as JavaScript,
// and `Embargo.lock` as TOML:
//
// {
// "JavaScript": ["notjs"],
// "TOML": ["Embargo.lock"]
// }
//
"file_types": {
"Plain Text": ["txt"],
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json"],
"Shell Script": [".env.*"]
},
/// By default use a recent system version of node, or install our own.
/// You can override this to use a version of node that is not in $PATH with:
/// {
/// "node": {
/// "path": "/path/to/node"
/// "npm_path": "/path/to/npm" (defaults to node_path/../npm)
/// }
/// }
/// or to ensure Zed always downloads and installs an isolated version of node:
/// {
/// "node": {
/// "ignore_system_version": true,
/// }
/// NOTE: changing this setting currently requires restarting Zed.
"node": {},
// The extensions that Zed should automatically install on startup.
//
// If you don't want any of these extensions, add this field to your settings
// and change the value to `false`.
"auto_install_extensions": {
"html": true
},
// Different settings for specific languages.
"languages": {
"Astro": {
"language_servers": ["astro-language-server", "..."],
"prettier": {
"allowed": true,
"plugins": ["prettier-plugin-astro"]
}
},
"Blade": {
"prettier": {
"allowed": true
}
},
"C": {
"format_on_save": "off",
"use_on_type_format": false
},
"C++": {
"format_on_save": "off",
"use_on_type_format": false
},
"CSS": {
"prettier": {
"allowed": true
}
},
"Dart": {
"tab_size": 2
},
"Diff": {
"remove_trailing_whitespace_on_save": false,
"ensure_final_newline_on_save": false
},
"Elixir": {
"language_servers": ["elixir-ls", "!next-ls", "!lexical", "..."]
},
"Erlang": {
"language_servers": ["erlang-ls", "!elp", "..."]
},
"Go": {
"code_actions_on_format": {
"source.organizeImports": true
}
},
"GraphQL": {
"prettier": {
"allowed": true
}
},
"HEEX": {
"language_servers": ["elixir-ls", "!next-ls", "!lexical", "..."]
},
"HTML": {
"prettier": {
"allowed": true
}
},
"Java": {
"prettier": {
"allowed": true,
"plugins": ["prettier-plugin-java"]
}
},
"JavaScript": {
"language_servers": ["!typescript-language-server", "vtsls", "..."],
"prettier": {
"allowed": true
}
},
"JSON": {
"prettier": {
"allowed": true
}
},
"JSONC": {
"prettier": {
"allowed": true
}
},
"Markdown": {
"format_on_save": "off",
"use_on_type_format": false,
"prettier": {
"allowed": true
}
},
"PHP": {
"language_servers": ["phpactor", "!intelephense", "..."],
"prettier": {
"allowed": true,
"plugins": ["@prettier/plugin-php"],
"parser": "php"
}
},
"Ruby": {
"language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "..."]
},
"SCSS": {
"prettier": {
"allowed": true
}
},
"SQL": {
"prettier": {
"allowed": true,
"plugins": ["prettier-plugin-sql"]
}
},
"Starlark": {
"language_servers": ["starpls", "!buck2-lsp", "..."]
},
"Svelte": {
"language_servers": ["svelte-language-server", "..."],
"prettier": {
"allowed": true,
"plugins": ["prettier-plugin-svelte"]
}
},
"TSX": {
"language_servers": ["!typescript-language-server", "vtsls", "..."],
"prettier": {
"allowed": true
}
},
"Twig": {
"prettier": {
"allowed": true
}
},
"TypeScript": {
"language_servers": ["!typescript-language-server", "vtsls", "..."],
"prettier": {
"allowed": true
}
},
"Vue.js": {
"language_servers": ["vue-language-server", "..."],
"prettier": {
"allowed": true
}
},
"XML": {
"prettier": {
"allowed": true,
"plugins": ["@prettier/plugin-xml"]
}
},
"YAML": {
"prettier": {
"allowed": true
}
}
},
// Different settings for specific language models.
"language_models": {
"anthropic": {
"version": "1",
"api_url": "https://api.anthropic.com"
},
"google": {
"api_url": "https://generativelanguage.googleapis.com"
},
"ollama": {
"api_url": "http://localhost:11434"
},
"openai": {
"version": "1",
"api_url": "https://api.openai.com/v1"
}
},
// Zed's Prettier integration settings.
// Allows to enable/disable formatting with Prettier
// and configure default Prettier, used when no project-level Prettier installation is found.
"prettier": {
// // Whether to consider prettier formatter or not when attempting to format a file.
// "allowed": false,
//
// // Use regular Prettier json configuration.
// // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
// // the project has no other Prettier installed.
// "plugins": [],
//
// // Use regular Prettier json configuration.
// // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
// // the project has no other Prettier installed.
// "trailingComma": "es5",
// "tabWidth": 4,
// "semi": false,
// "singleQuote": true
},
// LSP Specific settings.
"lsp": {
// Specify the LSP name as a key here.
// "rust-analyzer": {
// // These initialization options are merged into Zed's defaults
// "initialization_options": {
// "check": {
// "command": "clippy" // rust-analyzer.check.command (default: "check")
// }
// }
// }
},
// Jupyter settings
"jupyter": {
"enabled": true
// Specify the language name as the key and the kernel name as the value.
// "kernel_selections": {
// "python": "conda-base"
// "typescript": "deno"
// }
},
// Vim settings
"vim": {
"toggle_relative_line_numbers": false,
"use_system_clipboard": "always",
"use_multiline_find": false,
"use_smartcase_find": false,
"custom_digraphs": {}
},
// The server to connect to. If the environment variable
// ZED_SERVER_URL is set, it will override this setting.
"server_url": "https://zed.dev",
// Settings overrides to use when using Zed Preview.
// Mostly useful for developers who are managing multiple instances of Zed.
"preview": {
// "theme": "Andromeda"
},
// Settings overrides to use when using Zed Nightly.
// Mostly useful for developers who are managing multiple instances of Zed.
"nightly": {
// "theme": "Andromeda"
},
// Settings overrides to use when using Zed Stable.
// Mostly useful for developers who are managing multiple instances of Zed.
"stable": {
// "theme": "Andromeda"
},
// Settings overrides to use when using Zed Dev.
// Mostly useful for developers who are managing multiple instances of Zed.
"dev": {
// "theme": "Andromeda"
},
// Task-related settings.
"task": {
// Whether to show task status indicator in the status bar. Default: true
"show_status_indicator": true
},
// Whether to show full labels in line indicator or short ones
//
// Values:
// - `short`: "2 s, 15 l, 32 c"
// - `long`: "2 selections, 15 lines, 32 characters"
// Default: long
"line_indicator_format": "long",
// Set a proxy to use. The proxy protocol is specified by the URI scheme.
//
// Supported URI scheme: `http`, `https`, `socks4`, `socks4a`, `socks5`,
// `socks5h`. `http` will be used when no scheme is specified.
//
// By default no proxy will be used, or Zed will try get proxy settings from
// environment variables.
//
// Examples:
// - "proxy": "socks5h://localhost:10808"
// - "proxy": "http://127.0.0.1:10809"
"proxy": null,
// Set to configure aliases for the command palette.
// When typing a query which is a key of this object, the value will be used instead.
//
// Examples:
// {
// "W": "workspace::Save"
// }
"command_aliases": {},
// ssh_connections is an array of ssh connections.
// You can configure these from `project: Open Remote` in the command palette.
// Zed's ssh support will pull configuration from your ~/.ssh too.
// Examples:
// [
// {
// "host": "example-box",
// // "port": 22, "username": "test", "args": ["-i", "/home/user/.ssh/id_rsa"]
// "projects": [
// {
// "paths": ["/home/user/code/zed"]
// }
// ]
// }
// ]
"ssh_connections": [],
// Configures context servers for use in the Assistant.
"context_servers": {}
}