Cargo.lock π
@@ -5028,6 +5028,8 @@ dependencies = [
"serde",
"serde_json",
"settings",
+ "task",
+ "theme",
"workspace-hack",
"zed",
"zed-util",
Ben Kunkle created
Closes #ISSUE
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Cargo.lock | 2
crates/docs_preprocessor/Cargo.toml | 2
crates/docs_preprocessor/src/main.rs | 201 +++++++++++++++++
crates/settings/src/keymap_file.rs | 52 ++-
docs/src/ai/agent-settings.md | 28 +-
docs/src/ai/ai-improvement.md | 4
docs/src/ai/configuration.md | 2
docs/src/ai/edit-prediction.md | 36 +-
docs/src/ai/external-agents.md | 8
docs/src/ai/inline-assistant.md | 2
docs/src/ai/llm-providers.md | 30 +-
docs/src/ai/mcp.md | 4
docs/src/completions.md | 2
docs/src/configuring-languages.md | 34 +-
docs/src/configuring-zed.md | 258 +++++++++++-----------
docs/src/debugger.md | 30 +-
docs/src/development/local-collaboration.md | 4
docs/src/development/windows.md | 4
docs/src/diagnostics.md | 10
docs/src/extensions/icon-themes.md | 6
docs/src/git.md | 2
docs/src/globs.md | 2
docs/src/icon-themes.md | 2
docs/src/key-bindings.md | 14
docs/src/languages/ansible.md | 8
docs/src/languages/biome.md | 2
docs/src/languages/c.md | 6
docs/src/languages/cpp.md | 12
docs/src/languages/csharp.md | 2
docs/src/languages/dart.md | 4
docs/src/languages/deno.md | 8
docs/src/languages/diff.md | 2
docs/src/languages/elixir.md | 13
docs/src/languages/elm.md | 2
docs/src/languages/erlang.md | 2
docs/src/languages/fish.md | 2
docs/src/languages/go.md | 16
docs/src/languages/haskell.md | 4
docs/src/languages/helm.md | 2
docs/src/languages/html.md | 8
docs/src/languages/java.md | 6
docs/src/languages/javascript.md | 24 -
docs/src/languages/json.md | 6
docs/src/languages/jsonnet.md | 2
docs/src/languages/kotlin.md | 4
docs/src/languages/lua.md | 12
docs/src/languages/luau.md | 2
docs/src/languages/markdown.md | 4
docs/src/languages/nim.md | 2
docs/src/languages/php.md | 4
docs/src/languages/powershell.md | 2
docs/src/languages/proto.md | 4
docs/src/languages/python.md | 16
docs/src/languages/r.md | 2
docs/src/languages/ruby.md | 42 +-
docs/src/languages/rust.md | 24 +-
docs/src/languages/sh.md | 4
docs/src/languages/sql.md | 6
docs/src/languages/svelte.md | 10
docs/src/languages/swift.md | 2
docs/src/languages/tailwindcss.md | 14
docs/src/languages/terraform.md | 2
docs/src/languages/typescript.md | 12
docs/src/languages/xml.md | 2
docs/src/languages/yaml.md | 10
docs/src/remote-development.md | 12
docs/src/repl.md | 2
docs/src/snippets.md | 4
docs/src/tasks.md | 24 +-
docs/src/telemetry.md | 2
docs/src/themes.md | 4
docs/src/vim.md | 32 +-
docs/src/visual-customization.md | 71 +++---
docs/src/workspace-persistence.md | 2
74 files changed, 705 insertions(+), 498 deletions(-)
@@ -5028,6 +5028,8 @@ dependencies = [
"serde",
"serde_json",
"settings",
+ "task",
+ "theme",
"workspace-hack",
"zed",
"zed-util",
@@ -20,6 +20,8 @@ util.workspace = true
workspace-hack.workspace = true
zed.workspace = true
zlog.workspace = true
+task.workspace = true
+theme.workspace = true
[lints]
workspace = true
@@ -53,9 +53,20 @@ fn main() -> Result<()> {
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
enum PreprocessorError {
- ActionNotFound { action_name: String },
- DeprecatedActionUsed { used: String, should_be: String },
+ ActionNotFound {
+ action_name: String,
+ },
+ DeprecatedActionUsed {
+ used: String,
+ should_be: String,
+ },
InvalidFrontmatterLine(String),
+ InvalidSettingsJson {
+ file: std::path::PathBuf,
+ line: usize,
+ snippet: String,
+ error: String,
+ },
}
impl PreprocessorError {
@@ -72,6 +83,20 @@ impl PreprocessorError {
}
PreprocessorError::ActionNotFound { action_name }
}
+
+ fn new_for_invalid_settings_json(
+ chapter: &Chapter,
+ location: usize,
+ snippet: String,
+ error: String,
+ ) -> Self {
+ PreprocessorError::InvalidSettingsJson {
+ file: chapter.path.clone().expect("chapter has path"),
+ line: chapter.content[..location].lines().count() + 1,
+ snippet,
+ error,
+ }
+ }
}
impl std::fmt::Display for PreprocessorError {
@@ -88,6 +113,21 @@ impl std::fmt::Display for PreprocessorError {
"Deprecated action used: {} should be {}",
used, should_be
),
+ PreprocessorError::InvalidSettingsJson {
+ file,
+ line,
+ snippet,
+ error,
+ } => {
+ write!(
+ f,
+ "Invalid settings JSON at {}:{}\nError: {}\n\n{}",
+ file.display(),
+ line,
+ error,
+ snippet
+ )
+ }
}
}
}
@@ -100,11 +140,11 @@ fn handle_preprocessing() -> Result<()> {
let (_ctx, mut book) = CmdPreprocessor::parse_input(input.as_bytes())?;
let mut errors = HashSet::<PreprocessorError>::new();
-
handle_frontmatter(&mut book, &mut errors);
template_big_table_of_actions(&mut book);
template_and_validate_keybindings(&mut book, &mut errors);
template_and_validate_actions(&mut book, &mut errors);
+ template_and_validate_json_snippets(&mut book, &mut errors);
if !errors.is_empty() {
const ANSI_RED: &str = "\x1b[31m";
@@ -235,6 +275,161 @@ fn find_binding(os: &str, action: &str) -> Option<String> {
})
}
+fn template_and_validate_json_snippets(book: &mut Book, errors: &mut HashSet<PreprocessorError>) {
+ fn for_each_labeled_code_block_mut(
+ book: &mut Book,
+ errors: &mut HashSet<PreprocessorError>,
+ f: impl Fn(&str, &str) -> anyhow::Result<()>,
+ ) {
+ const TAGGED_JSON_BLOCK_START: &'static str = "```json [";
+ const JSON_BLOCK_END: &'static str = "```";
+
+ for_each_chapter_mut(book, |chapter| {
+ let mut offset = 0;
+ while let Some(loc) = chapter.content[offset..].find(TAGGED_JSON_BLOCK_START) {
+ let loc = loc + offset;
+ let tag_start = loc + TAGGED_JSON_BLOCK_START.len();
+ offset = tag_start;
+ let Some(tag_end) = chapter.content[tag_start..].find(']') else {
+ errors.insert(PreprocessorError::new_for_invalid_settings_json(
+ chapter,
+ loc,
+ chapter.content[loc..tag_start].to_string(),
+ "Unclosed JSON block tag".to_string(),
+ ));
+ continue;
+ };
+ let tag_end = tag_end + tag_start;
+
+ let tag = &chapter.content[tag_start..tag_end];
+
+ if tag.contains('\n') {
+ errors.insert(PreprocessorError::new_for_invalid_settings_json(
+ chapter,
+ loc,
+ chapter.content[loc..tag_start].to_string(),
+ "Unclosed JSON block tag".to_string(),
+ ));
+ continue;
+ }
+
+ let snippet_start = tag_end + 1;
+ offset = snippet_start;
+
+ let Some(snippet_end) = chapter.content[snippet_start..].find(JSON_BLOCK_END)
+ else {
+ errors.insert(PreprocessorError::new_for_invalid_settings_json(
+ chapter,
+ loc,
+ chapter.content[loc..tag_end + 1].to_string(),
+ "Missing closing code block".to_string(),
+ ));
+ continue;
+ };
+ let snippet_end = snippet_start + snippet_end;
+ let snippet_json = &chapter.content[snippet_start..snippet_end];
+ offset = snippet_end + 3;
+
+ if let Err(err) = f(tag, snippet_json) {
+ errors.insert(PreprocessorError::new_for_invalid_settings_json(
+ chapter,
+ loc,
+ chapter.content[loc..snippet_end + 3].to_string(),
+ err.to_string(),
+ ));
+ continue;
+ };
+ let tag_range_complete = tag_start - 1..tag_end + 1;
+ offset -= tag_range_complete.len();
+ chapter.content.replace_range(tag_range_complete, "");
+ }
+ });
+ }
+
+ for_each_labeled_code_block_mut(book, errors, |label, snippet_json| {
+ let mut snippet_json_fixed = snippet_json
+ .to_string()
+ .replace("\n>", "\n")
+ .trim()
+ .to_string();
+ while snippet_json_fixed.starts_with("//") {
+ if let Some(line_end) = snippet_json_fixed.find('\n') {
+ snippet_json_fixed.replace_range(0..line_end, "");
+ snippet_json_fixed = snippet_json_fixed.trim().to_string();
+ }
+ }
+ match label {
+ "settings" => {
+ if !snippet_json_fixed.starts_with('{') || !snippet_json_fixed.ends_with('}') {
+ snippet_json_fixed.insert(0, '{');
+ snippet_json_fixed.push_str("\n}");
+ }
+ settings::parse_json_with_comments::<settings::SettingsContent>(
+ &snippet_json_fixed,
+ )?;
+ }
+ "keymap" => {
+ if !snippet_json_fixed.starts_with('[') || !snippet_json_fixed.ends_with(']') {
+ snippet_json_fixed.insert(0, '[');
+ snippet_json_fixed.push_str("\n]");
+ }
+
+ let keymap = settings::KeymapFile::parse(&snippet_json_fixed)
+ .context("Failed to parse keymap JSON")?;
+ for section in keymap.sections() {
+ for (keystrokes, action) in section.bindings() {
+ keystrokes
+ .split_whitespace()
+ .map(|source| gpui::Keystroke::parse(source))
+ .collect::<std::result::Result<Vec<_>, _>>()
+ .context("Failed to parse keystroke")?;
+ if let Some((action_name, _)) = settings::KeymapFile::parse_action(action)
+ .map_err(|err| anyhow::format_err!(err))
+ .context("Failed to parse action")?
+ {
+ anyhow::ensure!(
+ find_action_by_name(action_name).is_some(),
+ "Action not found: {}",
+ action_name
+ );
+ }
+ }
+ }
+ }
+ "debug" => {
+ if !snippet_json_fixed.starts_with('[') || !snippet_json_fixed.ends_with(']') {
+ snippet_json_fixed.insert(0, '[');
+ snippet_json_fixed.push_str("\n]");
+ }
+
+ settings::parse_json_with_comments::<task::DebugTaskFile>(&snippet_json_fixed)?;
+ }
+ "tasks" => {
+ if !snippet_json_fixed.starts_with('[') || !snippet_json_fixed.ends_with(']') {
+ snippet_json_fixed.insert(0, '[');
+ snippet_json_fixed.push_str("\n]");
+ }
+
+ settings::parse_json_with_comments::<task::TaskTemplates>(&snippet_json_fixed)?;
+ }
+ "icon-theme" => {
+ if !snippet_json_fixed.starts_with('{') || !snippet_json_fixed.ends_with('}') {
+ snippet_json_fixed.insert(0, '{');
+ snippet_json_fixed.push_str("\n}");
+ }
+
+ settings::parse_json_with_comments::<theme::IconThemeFamilyContent>(
+ &snippet_json_fixed,
+ )?;
+ }
+ label => {
+ anyhow::bail!("Unexpected JSON code block tag: {}", label)
+ }
+ };
+ Ok(())
+ });
+}
+
/// Removes any configurable options from the stringified action if existing,
/// ensuring that only the actual action name is returned. If the action consists
/// only of a string and nothing else, the string is returned as-is.
@@ -360,11 +360,10 @@ impl KeymapFile {
}
}
- fn build_keymap_action(
+ pub fn parse_action(
action: &KeymapAction,
- cx: &App,
- ) -> std::result::Result<(Box<dyn Action>, Option<String>), String> {
- let (build_result, action_input_string) = match &action.0 {
+ ) -> Result<Option<(&String, Option<&Value>)>, String> {
+ let name_and_input = match &action.0 {
Value::Array(items) => {
if items.len() != 2 {
return Err(format!(
@@ -380,22 +379,10 @@ impl KeymapFile {
MarkdownInlineCode(&action.0.to_string())
));
};
- let action_input = items[1].clone();
- if name.as_str() == ActionSequence::name_for_type() {
- (ActionSequence::build_sequence(action_input, cx), None)
- } else {
- let action_input_string = action_input.to_string();
- (
- cx.build_action(name, Some(action_input)),
- Some(action_input_string),
- )
- }
+ Some((name, Some(&items[1])))
}
- Value::String(name) if name.as_str() == ActionSequence::name_for_type() => {
- (Err(ActionSequence::expected_array_error()), None)
- }
- Value::String(name) => (cx.build_action(name, None), None),
- Value::Null => (Ok(NoAction.boxed_clone()), None),
+ Value::String(name) => Some((name, None)),
+ Value::Null => None,
_ => {
return Err(format!(
"expected two-element array of `[name, input]`. \
@@ -404,6 +391,33 @@ impl KeymapFile {
));
}
};
+ Ok(name_and_input)
+ }
+
+ fn build_keymap_action(
+ action: &KeymapAction,
+ cx: &App,
+ ) -> std::result::Result<(Box<dyn Action>, Option<String>), String> {
+ let (build_result, action_input_string) = match Self::parse_action(action)? {
+ Some((name, action_input)) if name.as_str() == ActionSequence::name_for_type() => {
+ match action_input {
+ Some(action_input) => (
+ ActionSequence::build_sequence(action_input.clone(), cx),
+ None,
+ ),
+ None => (Err(ActionSequence::expected_array_error()), None),
+ }
+ }
+ Some((name, Some(action_input))) => {
+ let action_input_string = action_input.to_string();
+ (
+ cx.build_action(name, Some(action_input.clone())),
+ Some(action_input_string),
+ )
+ }
+ Some((name, None)) => (cx.build_action(name, None), None),
+ None => (Ok(NoAction.boxed_clone()), None),
+ };
let action = match build_result {
Ok(action) => action,
@@ -8,7 +8,7 @@ Learn about all the settings you can customize in Zed's Agent Panel.
If you're using [Zed's hosted LLM service](./subscription.md), it sets `claude-sonnet-4` as the default model for agentic work (agent panel, inline assistant) and `gpt-5-nano` as the default "fast" model (thread summarization, git commit messages). If you're not subscribed or want to change these defaults, you can manually edit the `default_model` object in your settings:
-```json
+```json [settings]
{
"agent": {
"default_model": {
@@ -27,7 +27,7 @@ You can assign distinct and specific models for the following AI-powered feature
- Inline assistant model: Used for the inline assistant feature
- Commit message model: Used for generating Git commit messages
-```json
+```json [settings]
{
"agent": {
"default_model": {
@@ -64,7 +64,7 @@ The models you specify here are always used in _addition_ to your [default model
For example, the following configuration will generate two outputs for every assist.
One with Claude Sonnet 4 (the default model), and one with GPT-5-mini.
-```json
+```json [settings]
{
"agent": {
"default_model": {
@@ -85,7 +85,7 @@ One with Claude Sonnet 4 (the default model), and one with GPT-5-mini.
Specify a custom temperature for a provider and/or model:
-```json
+```json [settings]
"model_parameters": [
// To set parameters for all requests to OpenAI models:
{
@@ -114,7 +114,7 @@ Note that some of these settings are also surfaced in the Agent Panel's settings
Use the `default_view` setting to change the default view of the Agent Panel.
You can choose between `thread` (the default) and `text_thread`:
-```json
+```json [settings]
{
"agent": {
"default_view": "text_thread"
@@ -126,7 +126,7 @@ You can choose between `thread` (the default) and `text_thread`:
Use the `agent_font_size` setting to change the font size of rendered agent responses in the panel.
-```json
+```json [settings]
{
"agent": {
"agent_font_size": 18
@@ -141,7 +141,7 @@ Use the `agent_font_size` setting to change the font size of rendered agent resp
Control whether to allow the agent to run commands without asking you for permission.
The default value is `false`.
-```json
+```json [settings]
{
"agent": {
"always_allow_tool_actions": true
@@ -154,7 +154,7 @@ The default value is `false`.
Control whether to display review actions (accept & reject) in single buffers after the agent is done performing edits.
The default value is `false`.
-```json
+```json [settings]
{
"agent": {
"single_file_review": true
@@ -169,7 +169,7 @@ When set to false, these controls are only available in the multibuffer review t
Control whether to hear a notification sound when the agent is done generating changes or needs your input.
The default value is `false`.
-```json
+```json [settings]
{
"agent": {
"play_sound_when_agent_done": true
@@ -182,7 +182,7 @@ The default value is `false`.
Use the `message_editor_min_lines` setting to control minimum number of lines of height the agent message editor should have.
It is set to `4` by default, and the max number of lines is always double of the minimum.
-```json
+```json [settings]
{
"agent": {
"message_editor_min_lines": 4
@@ -196,7 +196,7 @@ Make a modifier (`cmd` on macOS, `ctrl` on Linux) required to send messages.
This is encouraged for more thoughtful prompt crafting.
The default value is `false`.
-```json
+```json [settings]
{
"agent": {
"use_modifier_to_send": true
@@ -209,7 +209,7 @@ The default value is `false`.
Use the `expand_edit_card` setting to control whether edit cards show the full diff in the Agent Panel.
It is set to `true` by default, but if set to false, the card's height is capped to a certain number of lines, requiring a click to be expanded.
-```json
+```json [settings]
{
"agent": {
"expand_edit_card": false
@@ -222,7 +222,7 @@ It is set to `true` by default, but if set to false, the card's height is capped
Use the `expand_terminal_card` setting to control whether terminal cards show the command output in the Agent Panel.
It is set to `true` by default, but if set to false, the card will be fully collapsed even while the command is running, requiring a click to be expanded.
-```json
+```json [settings]
{
"agent": {
"expand_terminal_card": false
@@ -235,7 +235,7 @@ It is set to `true` by default, but if set to false, the card will be fully coll
Control whether to display the thumbs up/down buttons at the bottom of each agent response, allowing to give Zed feedback about the agent's performance.
The default value is `true`.
-```json
+```json [settings]
{
"agent": {
"enable_feedback": false
@@ -63,7 +63,7 @@ Zed will intentionally exclude certain files from Predictive Edits entirely, eve
You can inspect this exclusion list by opening `zed: open default settings` from the command palette:
-```json
+```json [settings]
{
"edit_predictions": {
// A list of globs representing files that edit predictions should be disabled for.
@@ -83,7 +83,7 @@ You can inspect this exclusion list by opening `zed: open default settings` from
Users may explicitly exclude additional paths and/or file extensions by adding them to [`edit_predictions.disabled_globs`](https://zed.dev/docs/configuring-zed#edit-predictions) in their Zed settings.json:
-```json
+```json [settings]
{
"edit_predictions": {
"disabled_globs": ["secret_dir/*", "**/*.log"]
@@ -14,7 +14,7 @@ When using AI in Zed, you can configure multiple dimensions:
We want to respect users who want to use Zed without interacting with AI whatsoever.
To do that, add the following key to your `settings.json`:
-```json
+```json [settings]
{
"disable_ai": true
}
@@ -21,9 +21,9 @@ Zed's Edit Prediction comes with two different display modes:
Toggle between them via the `mode` key:
-```json
+```json [settings]
"edit_predictions": {
- "mode": "eager" | "subtle"
+ "mode": "eager" // or "subtle"
},
```
@@ -50,7 +50,7 @@ See the [Configuring GitHub Copilot](#github-copilot) and [Configuring Supermave
By default, `tab` is used to accept edit predictions. You can use another keybinding by inserting this in your keymap:
-```json
+```json [settings]
{
"context": "Editor && edit_prediction",
"bindings": {
@@ -62,7 +62,7 @@ By default, `tab` is used to accept edit predictions. You can use another keybin
When there's a [conflict with the `tab` key](#edit-predictions-conflict), Zed uses a different context to accept keybindings (`edit_prediction_conflict`). If you want to use a different one, you can insert this in your keymap:
-```json
+```json [settings]
{
"context": "Editor && edit_prediction_conflict",
"bindings": {
@@ -75,7 +75,7 @@ If your keybinding contains a modifier (`ctrl` in the example above), it will al
You can also bind this action to keybind without a modifier. In that case, Zed will use the default modifier (`alt`) to preview the edit prediction.
-```json
+```json [settings]
{
"context": "Editor && edit_prediction_conflict",
"bindings": {
@@ -88,7 +88,7 @@ You can also bind this action to keybind without a modifier. In that case, Zed w
To maintain the use of the modifier key for accepting predictions when there is a language server completions menu, but allow `tab` to accept predictions regardless of cursor position, you can specify the context further with `showing_completions`:
-```json
+```json [settings]
{
"context": "Editor && edit_prediction_conflict && !showing_completions",
"bindings": {
@@ -102,7 +102,7 @@ To maintain the use of the modifier key for accepting predictions when there is
The keybinding example below causes `alt-tab` to always be used instead of sometimes using `tab`. You might want this in order to have just one keybinding to use for accepting edit predictions, since the behavior of `tab` varies based on context.
-```json
+```json [keymap]
{
"context": "Editor && edit_prediction",
"bindings": {
@@ -126,7 +126,7 @@ The keybinding example below causes `alt-tab` to always be used instead of somet
If `"vim_mode": true` is set within `settings.json`, then additional bindings are needed after the above to return `tab` to its original behavior:
-```json
+```json [keymap]
{
"context": "(VimControl && !menu) || vim_mode == replace || vim_mode == waiting",
"bindings": {
@@ -145,7 +145,7 @@ If `"vim_mode": true` is set within `settings.json`, then additional bindings ar
While `tab` and `alt-tab` are supported on Linux, `alt-l` is displayed instead. If your window manager does not reserve `alt-tab`, and you would prefer to use `tab` and `alt-tab`, include these bindings in `keymap.json`:
-```json
+```json [keymap]
{
"context": "Editor && edit_prediction",
"bindings": {
@@ -170,7 +170,7 @@ Zed requires at least one keybinding for the {#action editor::AcceptEditPredicti
If you have previously bound the default keybindings to different actions in the global context, you will not be able to preview or accept edit predictions. For example:
-```json
+```json [keymap]
[
// Your keymap
{
@@ -184,7 +184,7 @@ If you have previously bound the default keybindings to different actions in the
To fix this, you can specify your own keybinding for accepting edit predictions:
-```json
+```json [keymap]
[
// ...
{
@@ -208,7 +208,7 @@ Alternatively, if you have Zed set as your provider, consider [using Subtle Mode
To not have predictions appear automatically as you type, set this within `settings.json`:
-```json
+```json [settings]
{
"show_edit_predictions": false
}
@@ -221,7 +221,7 @@ Still, you can trigger edit predictions manually by executing {#action editor::S
To not have predictions appear automatically as you type when working with a specific language, set this within `settings.json`:
-```json
+```json [settings]
{
"language": {
"python": {
@@ -235,7 +235,7 @@ To not have predictions appear automatically as you type when working with a spe
To disable edit predictions for specific directories or files, set this within `settings.json`:
-```json
+```json [settings]
{
"edit_predictions": {
"disabled_globs": ["~/.config/zed/settings.json"]
@@ -247,7 +247,7 @@ To disable edit predictions for specific directories or files, set this within `
To completely turn off edit prediction across all providers, explicitly set the settings to `none`, like so:
-```json
+```json [settings]
"features": {
"edit_prediction_provider": "none"
},
@@ -257,7 +257,7 @@ To completely turn off edit prediction across all providers, explicitly set the
To use GitHub Copilot as your provider, set this within `settings.json`:
-```json
+```json [settings]
{
"features": {
"edit_prediction_provider": "copilot"
@@ -271,7 +271,7 @@ You should be able to sign-in to GitHub Copilot by clicking on the Copilot icon
If your organization uses GitHub Copilot Enterprise, you can configure Zed to use your enterprise instance by specifying the enterprise URI in your `settings.json`:
-```json
+```json [settings]
{
"edit_predictions": {
"copilot": {
@@ -294,7 +294,7 @@ Copilot can provide multiple completion alternatives, and these can be navigated
To use Supermaven as your provider, set this within `settings.json`:
-```json
+```json [settings]
{
"features": {
"edit_prediction_provider": "supermaven"
@@ -20,7 +20,7 @@ As of [Zed Stable v0.201.5](https://zed.dev/releases/stable/0.201.5) you should
If you'd like to bind this to a keyboard shortcut, you can do so by editing your `keymap.json` file via the `zed: open keymap` command to include:
-```json
+```json [keymap]
[
{
"bindings": {
@@ -36,7 +36,7 @@ The first time you create a Gemini CLI thread, Zed will install [@google/gemini-
By default, Zed will use this managed version of Gemini CLI even if you have it installed globally. However, you can configure it to use a version in your `PATH` by adding this to your settings:
-```json
+```json [settings]
{
"agent_servers": {
"gemini": {
@@ -77,7 +77,7 @@ Open the agent panel with {#kb agent::ToggleFocus}, and then use the `+` button
If you'd like to bind this to a keyboard shortcut, you can do so by editing your `keymap.json` file via the `zed: open keymap` command to include:
-```json
+```json [keymap]
[
{
"bindings": {
@@ -124,7 +124,7 @@ If you don't have a `CLAUDE.md` file, you can ask Claude Code to create one for
You can run any agent speaking ACP in Zed by changing your settings as follows:
-```json
+```json [settings]
{
"agent_servers": {
"Custom Agent": {
@@ -18,7 +18,7 @@ A useful pattern here is to create a thread in the Agent Panel, and then mention
To create a custom keybinding that prefills a prompt, you can add the following format in your keymap:
-```json
+```json [keymap]
[
{
"context": "Editor && mode == full",
@@ -43,7 +43,7 @@ Ensure your credentials have the following permissions set up:
Your IAM policy should look similar to:
-```json
+```json [settings]
{
"Version": "2012-10-17",
"Statement": [
@@ -65,7 +65,7 @@ With that done, choose one of the two authentication methods:
1. Ensure you have the AWS CLI installed and configured with a named profile
2. Open your `settings.json` (`zed: open settings`) and include the `bedrock` key under `language_models` with the following settings:
- ```json
+ ```json [settings]
{
"language_models": {
"bedrock": {
@@ -120,7 +120,7 @@ Zed will also use the `ANTHROPIC_API_KEY` environment variable if it's defined.
You can add custom models to the Anthropic provider by adding the following to your Zed `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"anthropic": {
@@ -147,14 +147,14 @@ Custom models will be listed in the model dropdown in the Agent Panel.
You can configure a model to use [extended thinking](https://docs.anthropic.com/en/docs/about-claude/models/extended-thinking-models) (if it supports it) by changing the mode in your model's configuration to `thinking`, for example:
-```json
+```json [settings]
{
"name": "claude-sonnet-4-latest",
"display_name": "claude-sonnet-4-thinking",
"max_tokens": 200000,
"mode": {
"type": "thinking",
- "budget_tokens": 4_096
+ "budget_tokens": 4096
}
}
```
@@ -174,7 +174,7 @@ Zed will also use the `DEEPSEEK_API_KEY` environment variable if it's defined.
The Zed agent comes pre-configured to use the latest version for common models (DeepSeek Chat, DeepSeek Reasoner).
If you wish to use alternate models or customize the API endpoint, you can do so by adding the following to your Zed `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"deepseek": {
@@ -231,7 +231,7 @@ By default, Zed will use `stable` versions of models, but you can use specific v
Here is an example of a custom Google AI model you could add to your Zed `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"google": {
@@ -286,7 +286,7 @@ The Zed agent comes pre-configured with several Mistral models (codestral-latest
All the default models support tool use.
If you wish to use alternate models or customize their parameters, you can do so by adding the following to your Zed `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"mistral": {
@@ -338,7 +338,7 @@ See [get_max_tokens in ollama.rs](https://github.com/zed-industries/zed/blob/mai
Depending on your hardware or use-case you may wish to limit or increase the context length for a specific model via settings.json:
-```json
+```json [settings]
{
"language_models": {
"ollama": {
@@ -406,7 +406,7 @@ Zed will also use the `OPENAI_API_KEY` environment variable if it's defined.
The Zed agent comes pre-configured to use the latest version for common models (GPT-5, GPT-5 mini, o4-mini, GPT-4.1, and others).
To use alternate models, perhaps a preview release, or if you wish to control the request parameters, you can do so by adding the following to your Zed `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"openai": {
@@ -446,7 +446,7 @@ Then, fill up the input fields available in the modal.
To do it via your `settings.json`, add the following snippet under `language_models`:
-```json
+```json [settings]
{
"language_models": {
"openai_compatible": {
@@ -499,7 +499,7 @@ Zed will also use the `OPENROUTER_API_KEY` environment variable if it's defined.
You can add custom models to the OpenRouter provider by adding the following to your Zed `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"open_router": {
@@ -555,7 +555,7 @@ Supported fields (all optional):
Example adding routing preferences to a model:
-```json
+```json [settings]
{
"language_models": {
"open_router": {
@@ -613,7 +613,7 @@ The xAI API key will be saved in your keychain. Zed will also use the `XAI_API_K
The Zed agent comes pre-configured with common Grok models. If you wish to use alternate models or customize their parameters, you can do so by adding the following to your Zed `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"x_ai": {
@@ -643,7 +643,7 @@ The Zed agent comes pre-configured with common Grok models. If you wish to use a
You can use a custom API endpoint for different providers, as long as it's compatible with the provider's API structure.
To do so, add the following to your `settings.json`:
-```json
+```json [settings]
{
"language_models": {
"some-provider": {
@@ -37,7 +37,7 @@ In any case, here are some of the ones available:
Creating an extension is not the only way to use MCP servers in Zed.
You can connect them by adding their commands directly to your `settings.json`, like so:
-```json
+```json [settings]
{
"context_servers": {
"your-mcp-server": {
@@ -79,7 +79,7 @@ However, if you want to ensure a given MCP server will be used, you can create [
As an example, [the Dagger team suggests](https://container-use.com/agent-integrations#zed) doing that with their [Container Use MCP server](https://zed.dev/extensions/mcp-server-container-use):
-```json
+```json [settings]
"agent": {
"profiles": {
"container-use": {
@@ -9,7 +9,7 @@ Zed supports two sources for completions:
When there is an appropriate language server available, Zed will provide completions of variable names, functions, and other symbols in the current file. You can disable these by adding the following to your Zed `settings.json` file:
-```json
+```json [settings]
"show_completions_on_input": false
```
@@ -28,7 +28,7 @@ Zed allows you to override global settings for individual languages. These custo
Here's an example of language-specific settings:
-```json
+```json [settings]
"languages": {
"Python": {
"tab_size": 4,
@@ -67,7 +67,7 @@ Zed automatically detects file types based on their extensions, but you can cust
To set up custom file associations, use the [`file_types`](./configuring-zed.md#file-types) setting in your `settings.json`:
-```json
+```json [settings]
"file_types": {
"C++": ["c"],
"TOML": ["MyLockFile"],
@@ -119,7 +119,7 @@ Some languages in Zed offer multiple language server options. You might have mul
You can specify your preference using the `language_servers` setting:
-```json
+```json [settings]
"languages": {
"PHP": {
"language_servers": ["intelephense", "!phpactor", "..."]
@@ -145,7 +145,7 @@ Not all languages in Zed support toolchain discovery and selection, but for thos
Many language servers accept custom configuration options. You can set these in the `lsp` section of your `settings.json`:
-```json
+```json [settings]
"lsp": {
"rust-analyzer": {
"initialization_options": {
@@ -170,7 +170,7 @@ Suppose you want to configure the following settings for TypeScript:
Here's how you would structure these settings in Zed's `settings.json`:
-```json
+```json [settings]
"lsp": {
"typescript-language-server": {
"initialization_options": {
@@ -198,7 +198,7 @@ Sent once during language server startup, requires server's restart to reapply c
For example, rust-analyzer and clangd rely on this way of configuring only.
-```json
+```json [settings]
"lsp": {
"rust-analyzer": {
"initialization_options": {
@@ -213,7 +213,7 @@ For example, rust-analyzer and clangd rely on this way of configuring only.
May be queried by the server multiple times.
Most of the servers would rely on this way of configuring only.
-```json
+```json [settings]
"lsp": {
"tailwindcss-language-server": {
"settings": {
@@ -229,7 +229,7 @@ Apart of the LSP-related server configuration options, certain servers in Zed al
Language servers are automatically downloaded or launched if found in your path, if you wish to specify an explicit alternate binary you can specify that in settings:
-```json
+```json [settings]
"lsp": {
"rust-analyzer": {
"binary": {
@@ -249,7 +249,7 @@ Language servers are automatically downloaded or launched if found in your path,
You can toggle language server support globally or per-language:
-```json
+```json [settings]
"languages": {
"Markdown": {
"enable_language_server": false
@@ -267,7 +267,7 @@ Zed provides support for code formatting and linting to maintain consistent code
Zed supports both built-in and external formatters. See [`formatter`](./configuring-zed.md#formatter) docs for more. You can configure formatters globally or per-language in your `settings.json`:
-```json
+```json [settings]
"languages": {
"JavaScript": {
"formatter": {
@@ -289,7 +289,7 @@ This example uses Prettier for JavaScript and the language server's formatter fo
To disable formatting for a specific language:
-```json
+```json [settings]
"languages": {
"Markdown": {
"format_on_save": "off"
@@ -301,7 +301,7 @@ To disable formatting for a specific language:
Linting in Zed is typically handled by language servers. Many language servers allow you to configure linting rules:
-```json
+```json [settings]
"lsp": {
"eslint": {
"settings": {
@@ -317,7 +317,7 @@ This configuration sets up ESLint to organize imports on save for JavaScript fil
To run linter fixes automatically on save:
-```json
+```json [settings]
"languages": {
"JavaScript": {
"formatter": {
@@ -331,7 +331,7 @@ To run linter fixes automatically on save:
Zed allows you to run both formatting and linting on save. Here's an example that uses Prettier for formatting and ESLint for linting JavaScript files:
-```json
+```json [settings]
"languages": {
"JavaScript": {
"formatter": [
@@ -368,7 +368,7 @@ Zed uses Tree-sitter grammars for syntax highlighting. Override the default high
This example makes comments italic and changes the color of strings:
-```json
+```json [settings]
"experimental.theme_overrides": {
"syntax": {
"comment": {
@@ -388,7 +388,7 @@ Change your theme:
1. Use the theme selector ({#kb theme_selector::Toggle})
2. Or set it in your `settings.json`:
-```json
+```json [settings]
"theme": {
"mode": "dark",
"dark": "One Dark",
@@ -410,7 +410,7 @@ To create your own theme extension, refer to the [Developing Theme Extensions](.
Inlay hints provide additional information inline in your code, such as parameter names or inferred types. Configure inlay hints in your `settings.json`:
-```json
+```json [settings]
"inlay_hints": {
"enabled": true,
"show_type_hints": true,
@@ -35,7 +35,7 @@ Extensions that provide language servers may also provide default settings for t
- Setting: `active_pane_modifiers`
- Default:
-```json
+```json [settings]
{
"active_pane_modifiers": {
"border_size": 0.0,
@@ -74,7 +74,7 @@ Non-negative `float` values
1. Contain the bottom dock, giving the full height of the window to the left and right docks.
-```json
+```json [settings]
{
"bottom_dock_layout": "contained"
}
@@ -82,7 +82,7 @@ Non-negative `float` values
2. Give the bottom dock the full width of the window, truncating the left and right docks.
-```json
+```json [settings]
{
"bottom_dock_layout": "full"
}
@@ -90,7 +90,7 @@ Non-negative `float` values
3. Left align the bottom dock, truncating the left dock and giving the right dock the full height of the window.
-```json
+```json [settings]
{
"bottom_dock_layout": "left_aligned"
}
@@ -98,7 +98,7 @@ Non-negative `float` values
4. Right align the bottom dock, giving the left dock the full height of the window and truncating the right dock.
-```json
+```json [settings]
{
"bottom_dock_layout": "right_aligned"
}
@@ -124,25 +124,25 @@ Non-negative `float` values
1. Allow rewrap in comments only:
-```json
+```json [settings]
{
"allow_rewrap": "in_comments"
}
```
-2. Allow rewrap everywhere:
+2. Allow rewrap in selections only:
-```json
+```json [settings]
{
- "allow_rewrap": "everywhere"
+ "allow_rewrap": "in_selections"
}
```
-3. Never allow rewrap:
+3. Allow rewrap anywhere:
-```json
+```json [settings]
{
- "allow_rewrap": "never"
+ "allow_rewrap": "anywhere"
}
```
@@ -192,7 +192,7 @@ ls ~/.local/share/zed/extensions/installed
Define extensions which should be installed (`true`) or never installed (`false`).
-```json
+```json [settings]
{
"auto_install_extensions": {
"html": true,
@@ -212,7 +212,7 @@ Define extensions which should be installed (`true`) or never installed (`false`
1. To disable autosave, set it to `off`:
-```json
+```json [settings]
{
"autosave": "off"
}
@@ -220,7 +220,7 @@ Define extensions which should be installed (`true`) or never installed (`false`
2. To autosave when focus changes, use `on_focus_change`:
-```json
+```json [settings]
{
"autosave": "on_focus_change"
}
@@ -228,7 +228,7 @@ Define extensions which should be installed (`true`) or never installed (`false`
3. To autosave when the active window changes, use `on_window_change`:
-```json
+```json [settings]
{
"autosave": "on_window_change"
}
@@ -236,7 +236,7 @@ Define extensions which should be installed (`true`) or never installed (`false`
4. To autosave after an inactivity period, use `after_delay`:
-```json
+```json [settings]
{
"autosave": {
"after_delay": {
@@ -298,7 +298,7 @@ Note that a save will be triggered when an unsaved tab is closed, even if this i
1. VS Code
-```json
+```json [settings]
{
"base_keymap": "VSCode"
}
@@ -306,7 +306,7 @@ Note that a save will be triggered when an unsaved tab is closed, even if this i
2. Atom
-```json
+```json [settings]
{
"base_keymap": "Atom"
}
@@ -314,7 +314,7 @@ Note that a save will be triggered when an unsaved tab is closed, even if this i
3. JetBrains
-```json
+```json [settings]
{
"base_keymap": "JetBrains"
}
@@ -322,7 +322,7 @@ Note that a save will be triggered when an unsaved tab is closed, even if this i
4. None
-```json
+```json [settings]
{
"base_keymap": "None"
}
@@ -330,7 +330,7 @@ Note that a save will be triggered when an unsaved tab is closed, even if this i
5. Sublime Text
-```json
+```json [settings]
{
"base_keymap": "SublimeText"
}
@@ -338,7 +338,7 @@ Note that a save will be triggered when an unsaved tab is closed, even if this i
6. TextMate
-```json
+```json [settings]
{
"base_keymap": "TextMate"
}
@@ -367,7 +367,7 @@ Zed supports all OpenType features that can be enabled or disabled for a given b
For example, to disable font ligatures, add the following to your settings:
-```json
+```json [settings]
{
"buffer_font_features": {
"calt": false
@@ -377,7 +377,7 @@ For example, to disable font ligatures, add the following to your settings:
You can also set other OpenType features, like setting `cv01` to `7`:
-```json
+```json [settings]
{
"buffer_font_features": {
"cv01": 7
@@ -396,7 +396,7 @@ You can also set other OpenType features, like setting `cv01` to `7`:
For example, to use `Nerd Font` as a fallback, add the following to your settings:
-```json
+```json [settings]
{
"buffer_font_fallbacks": ["Nerd Font"]
}
@@ -438,7 +438,7 @@ A font size from `6` to `100` pixels (inclusive)
- Setting: `centered_layout`
- Default:
-```json
+```json [settings]
"centered_layout": {
"left_padding": 0.2,
"right_padding": 0.2,
@@ -484,15 +484,15 @@ Note: Dirty files (files with unsaved changes) will not be automatically closed
1. Allow all diagnostics (default):
-```json
+```json [settings]
{
- "diagnostics_max_severity": null
+ "diagnostics_max_severity": "all"
}
```
2. Show only errors:
-```json
+```json [settings]
{
"diagnostics_max_severity": "error"
}
@@ -500,7 +500,7 @@ Note: Dirty files (files with unsaved changes) will not be automatically closed
3. Show errors and warnings:
-```json
+```json [settings]
{
"diagnostics_max_severity": "warning"
}
@@ -508,15 +508,15 @@ Note: Dirty files (files with unsaved changes) will not be automatically closed
4. Show errors, warnings, and information:
-```json
+```json [settings]
{
- "diagnostics_max_severity": "information"
+ "diagnostics_max_severity": "info"
}
```
5. Show all including hints:
-```json
+```json [settings]
{
"diagnostics_max_severity": "hint"
}
@@ -557,7 +557,7 @@ There are two options to choose from:
1. Behave as a regular buffer and select the whole word (default):
-```json
+```json [settings]
{
"double_click_in_multibuffer": "select"
}
@@ -565,7 +565,7 @@ There are two options to choose from:
2. Open the excerpt clicked as a new buffer in the new tab:
-```json
+```json [settings]
{
"double_click_in_multibuffer": "open"
}
@@ -589,7 +589,7 @@ For the case of "open", regular selection behavior can be achieved by holding `a
- Setting: `edit_predictions`
- Default:
-```json
+```json [settings]
"edit_predictions": {
"disabled_globs": [
"**/.env*",
@@ -627,19 +627,19 @@ List of `string` values
1. Don't show edit predictions in comments:
-```json
+```json [settings]
"disabled_in": ["comment"]
```
2. Don't show edit predictions in strings and comments:
-```json
+```json [settings]
"disabled_in": ["comment", "string"]
```
3. Only in Go, don't show edit predictions in strings and comments:
-```json
+```json [settings]
{
"languages": {
"Go": {
@@ -659,25 +659,25 @@ List of `string` values
1. Don't highlight the current line:
-```json
+```json [settings]
"current_line_highlight": "none"
```
2. Highlight the gutter area:
-```json
+```json [settings]
"current_line_highlight": "gutter"
```
3. Highlight the editor area:
-```json
+```json [settings]
"current_line_highlight": "line"
```
4. Highlight the full line:
-```json
+```json [settings]
"current_line_highlight": "all"
```
@@ -713,25 +713,25 @@ List of `string` values
1. A vertical bar:
-```json
+```json [settings]
"cursor_shape": "bar"
```
2. A block that surrounds the following character:
-```json
+```json [settings]
"cursor_shape": "block"
```
3. An underline / underscore that runs along the following character:
-```json
+```json [settings]
"cursor_shape": "underline"
```
4. An box drawn around the following character:
-```json
+```json [settings]
"cursor_shape": "hollow"
```
@@ -741,7 +741,7 @@ List of `string` values
- Setting: `gutter`
- Default:
-```json
+```json [settings]
{
"gutter": {
"line_numbers": true,
@@ -771,19 +771,19 @@ List of `string` values
1. Never hide the mouse cursor:
-```json
+```json [settings]
"hide_mouse": "never"
```
2. Hide only when typing:
-```json
+```json [settings]
"hide_mouse": "on_typing"
```
3. Hide on both typing and cursor movement:
-```json
+```json [settings]
"hide_mouse": "on_typing_and_movement"
```
@@ -797,25 +797,25 @@ List of `string` values
1. Place snippets at the top of the completion list:
-```json
+```json [settings]
"snippet_sort_order": "top"
```
2. Place snippets normally without any preference:
-```json
+```json [settings]
"snippet_sort_order": "inline"
```
3. Place snippets at the bottom of the completion list:
-```json
+```json [settings]
"snippet_sort_order": "bottom"
```
4. Do not show snippets in the completion list at all:
-```json
+```json [settings]
"snippet_sort_order": "none"
```
@@ -825,7 +825,7 @@ List of `string` values
- Setting: `scrollbar`
- Default:
-```json
+```json [settings]
"scrollbar": {
"show": "auto",
"cursors": true,
@@ -851,7 +851,7 @@ List of `string` values
1. Show the scrollbar if there's important information or follow the system's configured behavior:
-```json
+```json [settings]
"scrollbar": {
"show": "auto"
}
@@ -859,7 +859,7 @@ List of `string` values
2. Match the system's configured behavior:
-```json
+```json [settings]
"scrollbar": {
"show": "system"
}
@@ -867,7 +867,7 @@ List of `string` values
3. Always show the scrollbar:
-```json
+```json [settings]
"scrollbar": {
"show": "always"
}
@@ -875,7 +875,7 @@ List of `string` values
4. Never show the scrollbar:
-```json
+```json [settings]
"scrollbar": {
"show": "never"
}
@@ -941,41 +941,41 @@ List of `string` values
1. Show all diagnostics:
-```json
+```json [settings]
{
- "diagnostics": "all"
+ "show_diagnostics": "all"
}
```
2. Do not show any diagnostics:
-```json
+```json [settings]
{
- "diagnostics": "none"
+ "show_diagnostics": "off"
}
```
3. Show only errors:
-```json
+```json [settings]
{
- "diagnostics": "error"
+ "show_diagnostics": "error"
}
```
4. Show only errors and warnings:
-```json
+```json [settings]
{
- "diagnostics": "warning"
+ "show_diagnostics": "warning"
}
```
5. Show only errors, warnings, and information:
-```json
+```json [settings]
{
- "diagnostics": "information"
+ "show_diagnostics": "info"
}
```
@@ -985,7 +985,7 @@ List of `string` values
- Setting: `axes`
- Default:
-```json
+```json [settings]
"scrollbar": {
"axes": {
"horizontal": true,
@@ -1020,7 +1020,7 @@ List of `string` values
- Setting: `minimap`
- Default:
-```json
+```json [settings]
{
"minimap": {
"show": "never",
@@ -1041,7 +1041,7 @@ List of `string` values
1. Always show the minimap:
-```json
+```json [settings]
{
"show": "always"
}
@@ -1049,7 +1049,7 @@ List of `string` values
2. Show the minimap if the editor's scrollbars are visible:
-```json
+```json [settings]
{
"show": "auto"
}
@@ -1057,7 +1057,7 @@ List of `string` values
3. Never show the minimap:
-```json
+```json [settings]
{
"show": "never"
}
@@ -1073,7 +1073,7 @@ List of `string` values
1. Show the minimap thumb when hovering over the minimap:
-```json
+```json [settings]
{
"thumb": "hover"
}
@@ -1081,7 +1081,7 @@ List of `string` values
2. Always show the minimap thumb:
-```json
+```json [settings]
{
"thumb": "always"
}
@@ -1097,7 +1097,7 @@ List of `string` values
1. Display a border on all sides of the thumb:
-```json
+```json [settings]
{
"thumb_border": "full"
}
@@ -1105,7 +1105,7 @@ List of `string` values
2. Display a border on all sides except the left side:
-```json
+```json [settings]
{
"thumb_border": "left_open"
}
@@ -1113,7 +1113,7 @@ List of `string` values
3. Display a border on all sides except the right side:
-```json
+```json [settings]
{
"thumb_border": "right_open"
}
@@ -1121,7 +1121,7 @@ List of `string` values
4. Display a border only on the left side:
-```json
+```json [settings]
{
"thumb_border": "left_only"
}
@@ -1129,7 +1129,7 @@ List of `string` values
5. Display the thumb without any border:
-```json
+```json [settings]
{
"thumb_border": "none"
}
@@ -1145,7 +1145,7 @@ List of `string` values
1. Inherit the editor's current line highlight setting:
-```json
+```json [settings]
{
"minimap": {
"current_line_highlight": null
@@ -1155,7 +1155,7 @@ List of `string` values
2. Highlight the current line in the minimap:
-```json
+```json [settings]
{
"minimap": {
"current_line_highlight": "line"
@@ -1165,7 +1165,7 @@ List of `string` values
or
-```json
+```json [settings]
{
"minimap": {
"current_line_highlight": "all"
@@ -1175,7 +1175,7 @@ or
3. Do not highlight the current line in the minimap:
-```json
+```json [settings]
{
"minimap": {
"current_line_highlight": "gutter"
@@ -1185,7 +1185,7 @@ or
or
-```json
+```json [settings]
{
"minimap": {
"current_line_highlight": "none"
@@ -1199,7 +1199,7 @@ or
- Settings: `tab_bar`
- Default:
-```json
+```json [settings]
"tab_bar": {
"show": true,
"show_nav_history_buttons": true,
@@ -1243,7 +1243,7 @@ or
- Setting: `tabs`
- Default:
-```json
+```json [settings]
"tabs": {
"close_position": "right",
"file_icons": false,
@@ -1264,7 +1264,7 @@ or
1. Display the close button on the right:
-```json
+```json [settings]
{
"close_position": "right"
}
@@ -1272,7 +1272,7 @@ or
2. Display the close button on the left:
-```json
+```json [settings]
{
"close_position": "left"
}
@@ -1300,7 +1300,7 @@ or
1. Activate the tab that was open previously:
-```json
+```json [settings]
{
"activate_on_close": "history"
}
@@ -1308,7 +1308,7 @@ or
2. Activate the right neighbour tab if present:
-```json
+```json [settings]
{
"activate_on_close": "neighbour"
}
@@ -1316,7 +1316,7 @@ or
3. Activate the left neighbour tab if present:
-```json
+```json [settings]
{
"activate_on_close": "left_neighbour"
}
@@ -1332,7 +1332,7 @@ or
1. Show it just upon hovering the tab:
-```json
+```json [settings]
{
"show_close_button": "hover"
}
@@ -1340,7 +1340,7 @@ or
2. Show it persistently:
-```json
+```json [settings]
{
"show_close_button": "always"
}
@@ -1348,7 +1348,7 @@ or
3. Never show it, even if hovering it:
-```json
+```json [settings]
{
"show_close_button": "hidden"
}
@@ -1364,7 +1364,7 @@ or
1. Do not mark any files:
-```json
+```json [settings]
{
"show_diagnostics": "off"
}
@@ -1372,7 +1372,7 @@ or
2. Only mark files with errors:
-```json
+```json [settings]
{
"show_diagnostics": "errors"
}
@@ -1380,7 +1380,7 @@ or
3. Mark files with errors and warnings:
-```json
+```json [settings]
{
"show_diagnostics": "all"
}
@@ -1402,7 +1402,7 @@ or
- Setting: `drag_and_drop_selection`
- Default:
-```json
+```json [settings]
"drag_and_drop_selection": {
"enabled": true,
"delay": 300
@@ -1415,7 +1415,7 @@ or
- Setting: `toolbar`
- Default:
-```json
+```json [settings]
"toolbar": {
"breadcrumbs": true,
"quick_actions": true,
@@ -1495,7 +1495,7 @@ Positive `integer` value between 1 and 32. Values outside of this range will be
- Setting: `status_bar`
- Default:
-```json
+```json [settings]
"status_bar": {
"active_language_button": true,
"cursor_position_button": true
@@ -1529,7 +1529,7 @@ Some options are passed via `initialization_options` to the language server. The
For example to pass the `check` option to `rust-analyzer`, use the following configuration:
-```json
+```json [settings]
"lsp": {
"rust-analyzer": {
"initialization_options": {
@@ -1543,7 +1543,7 @@ For example to pass the `check` option to `rust-analyzer`, use the following con
While other options may be changed at a runtime and should be placed under `settings`:
-```json
+```json [settings]
"lsp": {
"yaml-language-server": {
"settings": {
@@ -1561,7 +1561,7 @@ While other options may be changed at a runtime and should be placed under `sett
- Setting: `global_lsp_settings`
- Default:
-```json
+```json [settings]
{
"global_lsp_settings": {
"button": true
@@ -1589,7 +1589,7 @@ While other options may be changed at a runtime and should be placed under `sett
- Setting: `features`
- Default:
-```json
+```json [settings]
{
"features": {
"edit_prediction_provider": "zed"
@@ -1607,7 +1607,7 @@ While other options may be changed at a runtime and should be placed under `sett
1. Use Zeta as the edit prediction provider:
-```json
+```json [settings]
{
"features": {
"edit_prediction_provider": "zed"
@@ -1617,7 +1617,7 @@ While other options may be changed at a runtime and should be placed under `sett
2. Use Copilot as the edit prediction provider:
-```json
+```json [settings]
{
"features": {
"edit_prediction_provider": "copilot"
@@ -1627,7 +1627,7 @@ While other options may be changed at a runtime and should be placed under `sett
3. Use Supermaven as the edit prediction provider:
-```json
+```json [settings]
{
"features": {
"edit_prediction_provider": "supermaven"
@@ -1637,7 +1637,7 @@ While other options may be changed at a runtime and should be placed under `sett
4. Turn off edit predictions across all providers
-```json
+```json [settings]
{
"features": {
"edit_prediction_provider": "none"
@@ -1655,7 +1655,7 @@ While other options may be changed at a runtime and should be placed under `sett
1. `on`, enables format on save obeying `formatter` setting:
-```json
+```json [settings]
{
"format_on_save": "on"
}
@@ -1663,7 +1663,7 @@ While other options may be changed at a runtime and should be placed under `sett
2. `off`, disables format on save:
-```json
+```json [settings]
{
"format_on_save": "off"
}
@@ -1679,7 +1679,7 @@ While other options may be changed at a runtime and should be placed under `sett
1. To use the current language server, use `"language_server"`:
-```json
+```json [settings]
{
"formatter": "language_server"
}
@@ -1687,7 +1687,7 @@ While other options may be changed at a runtime and should be placed under `sett
2. Or to use an external command, use `"external"`. Specify the name of the formatting program to run, and an array of arguments to pass to the program. The buffer's text will be passed to the program on stdin, and the formatted output should be written to stdout. For example, the following command would strip trailing spaces using [`sed(1)`](https://linux.die.net/man/1/sed):
-```json
+```json [settings]
{
"formatter": {
"external": {
@@ -1702,7 +1702,7 @@ While other options may be changed at a runtime and should be placed under `sett
WARNING: `{buffer_path}` should not be used to direct your formatter to read from a filename. Your formatter should only read from standard input and should not read or write files directly.
-```json
+```json [settings]
"formatter": {
"external": {
"command": "prettier",
@@ -1713,22 +1713,20 @@ WARNING: `{buffer_path}` should not be used to direct your formatter to read fro
4. Or to use code actions provided by the connected language servers, use `"code_actions"`:
-```json
+```json [settings]
{
- "formatter": {
- "code_actions": {
- // Use ESLint's --fix:
- "source.fixAll.eslint": true,
- // Organize imports on save:
- "source.organizeImports": true
- }
- }
+ "formatter": [
+ // Use ESLint's --fix:
+ { "code_action": "source.fixAll.eslint" },
+ // Organize imports on save:
+ { "code_action": "source.organizeImports" }
+ ]
}
```
5. Or to use multiple formatters consecutively, use an array of formatters:
-```json
+```json [settings]
{
"formatter": [
{ "language_server": { "name": "rust-analyzer" } },
@@ -1781,7 +1779,7 @@ The result is still `)))` and not `))))))`, which is what it would be by default
- Description: Files or globs of files that will be excluded by Zed entirely. They will be skipped during file scans, file searches, and not be displayed in the project file tree. Overrides `file_scan_inclusions`.
- Default:
-```json
+```json [settings]
"file_scan_exclusions": [
"**/.git",
"**/.svn",
@@ -1803,7 +1801,7 @@ Note, specifying `file_scan_exclusions` in settings.json will override the defau
- Description: Files or globs of files that will be included by Zed, even when ignored by git. This is useful for files that are not tracked by git, but are still important to your project. Note that globs that are overly broad can slow down Zed's file scanning. `file_scan_exclusions` takes precedence over these inclusions.
- Default:
-```json
+```json [settings]
"file_scan_inclusions": [".env*"],
```
@@ -1813,7 +1811,7 @@ Note, specifying `file_scan_exclusions` in settings.json will override the defau
- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
- Default:
-```json
+```json [settings]
"file_types": {
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
"Shell Script": [".env.*"]
@@ -37,7 +37,7 @@ You can open the same modal by clicking the "plus" button at the top right of th
For languages that don't provide preconfigured debug tasks (this includes C, C++, and some extension-supported languages), you can define debug configurations in the `.zed/debug.json` file in your project root. This file should be an array of configuration objects:
-```json
+```json [debug]
[
{
"adapter": "CodeLLDB",
@@ -70,7 +70,7 @@ Compared to launching, attaching to an existing process might seem inferior, but
While configuration fields are debug adapter-dependent, most adapters support the following fields:
-```json
+```json [debug]
[
{
// The label for the debug configuration and used to identify the debug session inside the debug panel & new process modal
@@ -95,7 +95,7 @@ All configuration fields support [task variables](./tasks.md#variables).
Zed also allows embedding a Zed task in a `build` field that is run before the debugger starts. This is useful for setting up the environment or running any necessary setup steps before the debugger starts.
-```json
+```json [debug]
[
{
"label": "Build Binary",
@@ -112,7 +112,7 @@ Zed also allows embedding a Zed task in a `build` field that is run before the d
Build tasks can also refer to the existing tasks by unsubstituted label:
-```json
+```json [debug]
[
{
"label": "Build Binary",
@@ -169,7 +169,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
2. `right` - The debug panel will be docked to the right side of the UI.
3. `bottom` - The debug panel will be docked to the bottom of the UI.
-```json
+```json [settings]
"debugger": {
"dock": "bottom"
},
@@ -187,7 +187,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
The meaning of a statement is determined by the adapter and it may be considered equivalent to a line.
For example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.
-```json
+```json [settings]
{
"debugger": {
"stepping_granularity": "statement"
@@ -197,7 +197,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
2. Line - The step should allow the program to run until the current source line has executed.
-```json
+```json [settings]
{
"debugger": {
"stepping_granularity": "line"
@@ -207,7 +207,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
3. Instruction - The step should allow one instruction to execute (e.g. one x86 instruction).
-```json
+```json [settings]
{
"debugger": {
"stepping_granularity": "instruction"
@@ -225,7 +225,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
`boolean` values
-```json
+```json [settings]
{
"debugger": {
"save_breakpoints": true
@@ -243,7 +243,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
`boolean` values
-```json
+```json [settings]
{
"debugger": {
"show_button": true
@@ -261,7 +261,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
`integer` values
-```json
+```json [settings]
{
"debugger": {
"timeout": 3000
@@ -277,7 +277,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
**Options**
-```json
+```json [settings]
{
"inlay_hints": {
"show_value_hints": false
@@ -297,7 +297,7 @@ Inline value hints can also be toggled from the Editor Controls menu in the edit
`boolean` values
-```json
+```json [settings]
{
"debugger": {
"log_dap_communications": true
@@ -315,7 +315,7 @@ Inline value hints can also be toggled from the Editor Controls menu in the edit
`boolean` values
-```json
+```json [settings]
{
"debugger": {
"format_dap_log_messages": true
@@ -331,7 +331,7 @@ Inline value hints can also be toggled from the Editor Controls menu in the edit
You can pass `binary`, `args`, or both. `binary` should be a path to a _debug adapter_ (like `lldb-dap`) not a _debugger_ (like `lldb` itself). The `args` setting overrides any arguments that Zed would otherwise pass to the adapter.
-```json
+```json [settings]
{
"dap": {
"CodeLLDB": {
@@ -106,7 +106,7 @@ cat crates/collab/seed.default.json
To use a different set of admin users, you can create your own version of that json file and export the `SEED_PATH` environment variable. Note that the usernames listed in the admins list currently must correspond to valid GitHub users.
-```json
+```json [settings]
{
"admins": ["admin1", "admin2"],
"channels": ["zed"]
@@ -196,7 +196,7 @@ By default Zed assumes that the DATABASE_URL is a Postgres database, but you can
To authenticate you must first configure the server by creating a seed.json file that contains at a minimum your github handle. This will be used to create the user on demand.
-```json
+```json [settings]
{
"admins": ["nathansobo"]
}
@@ -18,7 +18,7 @@ Clone down the [Zed repository](https://github.com/zed-industries/zed).
If you can't compile Zed, make sure that you have at least the following components installed in case of a Visual Studio installation:
-```json
+```json [settings]
{
"version": "1.0",
"components": [
@@ -36,7 +36,7 @@ If you can't compile Zed, make sure that you have at least the following compone
Or if in case of just Build Tools, the following components:
-```json
+```json [settings]
{
"version": "1.0",
"components": [
@@ -8,7 +8,7 @@ By default, Zed displays all diagnostics as underlined text in the editor and th
Editor diagnostics could be filtered with the
-```json5
+```json [settings]
"diagnostics_max_severity": null
```
@@ -16,7 +16,7 @@ editor setting (possible values: `"off"`, `"error"`, `"warning"`, `"info"`, `"hi
The scrollbar ones are configured with the
-```json5
+```json [settings]
"scrollbar": {
"diagnostics": "all",
}
@@ -32,7 +32,7 @@ Or, `editor::GoToDiagnostic` and `editor::GoToPreviousDiagnostic` could be used
Zed supports showing diagnostic as lens to the right of the code.
This is disabled by default, but can either be temporarily turned on (or off) using the editor menu, or permanently, using the
-```json5
+```json [settings]
"diagnostics": {
"inline": {
"enabled": true,
@@ -49,7 +49,7 @@ Project panel can have its entries coloured based on the severity of the diagnos
To configure, use
-```json5
+```json [settings]
"project_panel": {
"show_diagnostics": "all",
}
@@ -61,7 +61,7 @@ configuration (possible values: `"off"`, `"errors"`, `"all"` (default))
Similar to the project panel, editor tabs can be colorized with the
-```json5
+```json [settings]
"tabs": {
"show_diagnostics": "off",
}
@@ -17,7 +17,7 @@ Each icon theme file should adhere to the JSON schema specified at [`https://zed
Here is an example of the structure of an icon theme:
-```json
+```json [icon-theme]
{
"$schema": "https://zed.dev/schema/icon_themes/v0.3.0.json",
"name": "My Icon Theme",
@@ -34,8 +34,8 @@ Here is an example of the structure of an icon theme:
"stylesheets": {
"collapsed": "./icons/folder-stylesheets.svg",
"expanded": "./icons/folder-stylesheets-open.svg"
- },
- }
+ }
+ },
"chevron_icons": {
"collapsed": "./icons/chevron-right.svg",
"expanded": "./icons/chevron-down.svg"
@@ -83,7 +83,7 @@ You can ask AI to generate a commit message by focusing on the message editor wi
You can specify your preferred model to use by providing a `commit_message_model` agent setting. See [Feature-specific models](./ai/agent-settings.md#feature-specific-models) for more information.
-```json
+```json [settings]
{
"agent": {
"version": "2",
@@ -57,7 +57,7 @@ When using the "Include" / "Exclude" filters on a Project Search each glob is wr
Alternatively, if in your Zed settings you wanted a [`file_types`](./configuring-zed.md#file-types) override which only applied to a certain directory you must explicitly include the wildcard globs. For example, if you had a directory of template files with the `html` extension that you wanted to recognize as Jinja2 template you could use the following:
-```json
+```json [settings]
{
"file_types": {
"C++": ["[cC]"],
@@ -18,7 +18,7 @@ Your selected icon theme is stored in your settings file. You can open your sett
Just like with themes, Zed allows for configuring different icon themes for light and dark mode. You can set the mode to `"light"` or `"dark"` to ignore the current system mode.
-```json
+```json [settings]
{
"icon_theme": {
"mode": "system",
@@ -34,7 +34,7 @@ If you are using a non-QWERTY, Latin-character keyboard, you may want to set `us
For example:
-```json
+```json [keymap]
[
{
"bindings": {
@@ -72,7 +72,7 @@ The keys can be any single Unicode codepoint that your keyboard generates (for e
A few examples:
-```json
+```json [settings]
"bindings": {
"cmd-k cmd-s": "zed::OpenKeymap", // matches β-k then β-s
"space e": "editor::Complete", // type space then e
@@ -161,7 +161,7 @@ On keyboards that support extended Latin alphabets (French AZERTY, German QWERTZ
If you are defining shortcuts in your personal keymap, you can opt into the key equivalent mapping by setting `use_key_equivalents` to `true` in your keymap:
-```json
+```json [keymap]
[
{
"use_key_equivalents": true,
@@ -187,7 +187,7 @@ If you'd like a given binding to do nothing in a given context, you can use
want to disable it, or if you want to type the character that would be typed by
the sequence, or if you want to disable multikey bindings starting with that key.
-```json
+```json [keymap]
[
{
"context": "Workspace",
@@ -202,7 +202,7 @@ A `null` binding follows the same precedence rules as normal actions, so it disa
This is useful for preventing Zed from falling back to a default key binding when the action you specified is conditional and propagates. For example, `buffer_search::DeployReplace` only triggers when the search bar is not in view. If the search bar is in view, it would propagate and trigger the default action set for that key binding, such as opening the right dock. To prevent this from happening:
-```json
+```json [keymap]
[
{
"context": "Workspace",
@@ -223,7 +223,7 @@ This is useful for preventing Zed from falling back to a default key binding whe
A common request is to be able to map from a single keystroke to a sequence. You can do this with the `workspace::SendKeystrokes` action.
-```json
+```json [keymap]
[
{
"bindings": {
@@ -262,7 +262,7 @@ If you're on Linux or Windows, you might find yourself wanting to forward key co
For example, `ctrl-n` creates a new tab in Zed on Linux. If you want to send `ctrl-n` to the built-in terminal when it's focused, add the following to your keymap:
-```json
+```json [settings]
{
"context": "Terminal",
"bindings": {
@@ -11,7 +11,7 @@ Support for Ansible in Zed is provided via a community-maintained [Ansible exten
To avoid mishandling non-Ansible YAML files, the Ansible Language is not associated with any file extensions by default. To change this behavior you can add a `"file_types"` section to Zed settings inside your project (`.zed/settings.json`) or your Zed user settings (`~/.config/zed/settings.json`) to match your folder/naming conventions. For example:
-```json
+```json [settings]
"file_types": {
"Ansible": [
"**.ansible.yml",
@@ -50,7 +50,7 @@ If your inventory file is in the YAML format, you can either:
- Or configure the yaml language server settings to set this schema for all your inventory files, that match your inventory pattern, under your Zed settings ([ref](https://zed.dev/docs/languages/yaml)):
-```json
+```json [settings]
"lsp": {
"yaml-language-server": {
"settings": {
@@ -71,7 +71,7 @@ If your inventory file is in the YAML format, you can either:
By default, the following default config is passed to the Ansible language server. It conveniently mirrors the defaults set by [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/03bc581e05e81d33808b42b2d7e76d70adb3b595/lua/lspconfig/configs/ansiblels.lua) for the Ansible language server:
-```json
+```json [settings]
{
"ansible": {
"ansible": {
@@ -99,7 +99,7 @@ By default, the following default config is passed to the Ansible language serve
When desired, any of the above default settings can be overridden under the `"lsp"` section of your Zed settings file. For example:
-```json
+```json [settings]
"lsp": {
// Note, the Zed Ansible extension prefixes all settings with `ansible`
// so instead of using `ansible.ansible.path` use `ansible.path`.
@@ -24,7 +24,7 @@ The Biome extension includes support for the following languages:
By default, the `biome.json` file is required to be in the root of the workspace.
-```json
+```json [settings]
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json"
}
@@ -17,7 +17,7 @@ CompileFlags:
By default clang and gcc will recognize `*.C` and `*.H` (uppercase extensions) as C++ and not C and so Zed too follows this convention. If you are working with a C-only project (perhaps one with legacy uppercase pathing like `FILENAME.C`) you can override this behavior by adding this to your settings:
-```json
+```json [settings]
{
"file_types": {
"C": ["C", "H"]
@@ -40,7 +40,7 @@ See [Clang-Format Style Options](https://clang.llvm.org/docs/ClangFormatStyleOpt
You can trigger formatting via {#kb editor::Format} or the `editor: format` action from the command palette or by adding `format_on_save` to your Zed settings:
-```json
+```json [settings]
"languages": {
"C": {
"format_on_save": "on",
@@ -69,7 +69,7 @@ You can use CodeLLDB or GDB to debug native binaries. (Make sure that your build
### Build and Debug Binary
-```json
+```json [debug]
[
{
"label": "Debug native binary",
@@ -13,7 +13,7 @@ By default, Zed will try to find a `clangd` in your `$PATH` and try to use that.
If you want to install a pre-release `clangd` version instead you can instruct Zed to do so by setting `pre_release` to `true` in your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"clangd": {
@@ -27,7 +27,7 @@ If you want to install a pre-release `clangd` version instead you can instruct Z
If you want to disable Zed looking for a `clangd` binary, you can set `ignore_system_version` to `true` in your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"clangd": {
@@ -41,7 +41,7 @@ If you want to disable Zed looking for a `clangd` binary, you can set `ignore_sy
If you want to use a binary in a custom location, you can specify a `path` and optional `arguments`:
-```json
+```json [settings]
{
"lsp": {
"clangd": {
@@ -60,7 +60,7 @@ This `"path"` has to be an absolute path.
You can pass any number of arguments to clangd. To see a full set of available options, run `clangd --help` from the command line. For example with `--function-arg-placeholders=0` completions contain only parentheses for function calls, while the default (`--function-arg-placeholders=1`) completions also contain placeholders for method parameters.
-```json
+```json [settings]
{
"lsp": {
"clangd": {
@@ -93,7 +93,7 @@ See [Clang-Format Style Options](https://clang.llvm.org/docs/ClangFormatStyleOpt
You can trigger formatting via {#kb editor::Format} or the `editor: format` action from the command palette or by adding `format_on_save` to your Zed settings:
-```json
+```json [settings]
"languages": {
"C++": {
"format_on_save": "on",
@@ -137,7 +137,7 @@ You can use CodeLLDB or GDB to debug native binaries. (Make sure that your build
### Build and Debug Binary
-```json
+```json [debug]
[
{
"label": "Debug native binary",
@@ -11,7 +11,7 @@ C# support is available through the [C# extension](https://github.com/zed-extens
The `OmniSharp` binary can be configured in a Zed settings file with:
-```json
+```json [settings]
{
"lsp": {
"omnisharp": {
@@ -22,7 +22,7 @@ dart --version
If you would like to use a specific dart binary or use dart via FVM you can specify the `dart` binary in your Zed settings.jsons file:
-```json
+```json [settings]
{
"lsp": {
"dart": {
@@ -39,7 +39,7 @@ If you would like to use a specific dart binary or use dart via FVM you can spec
Dart by-default uses a very conservative maximum line length (80). If you would like the dart LSP to permit a longer line length when auto-formatting, add the following to your Zed settings.json:
-```json
+```json [settings]
{
"lsp": {
"dart": {
@@ -8,7 +8,7 @@ Deno support is available through the [Deno extension](https://github.com/zed-ex
To use the Deno Language Server with TypeScript and TSX files, you will likely wish to disable the default language servers and enable deno by adding the following to your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"deno": {
@@ -61,7 +61,7 @@ TBD: Deno TypeScript REPL instructions [docs/repl#typescript-deno](../repl.md#ty
To get completions for `deno.json` or `package.json` you can add the following to your `settings.json`: (More info here https://zed.dev/docs/languages/json)
-```json
+```json [settings]
"lsp": {
"json-language-server": {
"settings": {
@@ -90,7 +90,7 @@ To get completions for `deno.json` or `package.json` you can add the following t
To debug deno programs, add this to `.zed/debug.json`
-```json
+```json [debug]
[
{
"adapter": "JavaScript",
@@ -110,7 +110,7 @@ To debug deno programs, add this to `.zed/debug.json`
To run deno tasks like tests from the ui, add this to `.zed/tasks.json`
-```json
+```json [tasks]
[
{
"label": "deno test",
@@ -10,7 +10,7 @@ Zed will not attempt to format diff files and has [`remove_trailing_whitespace_o
Zed will automatically recognize files with `patch` and `diff` extensions as Diff files. To recognize other extensions, add them to `file_types` in your Zed settings.json:
-```json
+```json [settings]
"file_types": {
"Diff": ["dif"]
},
@@ -21,7 +21,7 @@ The Elixir extension offers language server support for `expert`, `elixir-ls`, `
To switch to `expert`, add the following to your `settings.json`:
-```json
+```json [settings]
"languages": {
"Elixir": {
"language_servers": ["expert", "!elixir-ls", "!next-ls", "!lexical", "..."]
@@ -36,7 +36,7 @@ To switch to `expert`, add the following to your `settings.json`:
To switch to `next-ls`, add the following to your `settings.json`:
-```json
+```json [settings]
"languages": {
"Elixir": {
"language_servers": ["next-ls", "!expert", "!elixir-ls", "!lexical", "..."]
@@ -51,7 +51,7 @@ To switch to `next-ls`, add the following to your `settings.json`:
To switch to `lexical`, add the following to your `settings.json`:
-```json
+```json [settings]
"languages": {
"Elixir": {
"language_servers": ["lexical", "!expert", "!elixir-ls", "!next-ls", "..."]
@@ -84,11 +84,12 @@ brew install elixir-ls
If you prefer to format your code with [Mix](https://hexdocs.pm/mix/Mix.html), use the following snippet in your `settings.json` file to configure it as an external formatter. Formatting will occur on file save.
-```json
+```json [settings]
{
"languages": {
"Elixir": {
- "format_on_save": {
+ "format_on_save": "on",
+ "formatter": {
"external": {
"command": "mix",
"arguments": ["format", "--stdin-filename", "{buffer_path}", "-"]
@@ -105,7 +106,7 @@ You can pass additional elixir-ls workspace configuration options via lsp settin
The following example disables dialyzer:
-```json
+```json [settings]
"lsp": {
"elixir-ls": {
"settings": {
@@ -23,7 +23,7 @@ Zed support for Elm requires installation of `elm`, `elm-format`, and `elm-revie
Elm language server can be configured in your `settings.json`, e.g.:
-```json
+```json [settings]
{
"lsp": {
"elm-language-server": {
@@ -15,7 +15,7 @@ The Erlang extension offers language server support for `erlang_ls` and `erlang-
To switch to `erlang-language-platform`, add the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Erlang": {
@@ -18,7 +18,7 @@ fish_indent --version
2. Configure Zed to automatically format fish code with `fish_indent`:
-```json
+```json [settings]
"languages": {
"Fish": {
"formatter": {
@@ -41,7 +41,7 @@ If `gopls` is not found you will likely need to add `export PATH="$PATH:$HOME/go
Zed sets the following initialization options for inlay hints:
-```json
+```json [settings]
"hints": {
"assignVariableTypes": true,
"compositeLiteralFields": true,
@@ -57,12 +57,12 @@ to make the language server send back inlay hints when Zed has them enabled in t
Use
-```json
+```json [settings]
"lsp": {
"gopls": {
"initialization_options": {
"hints": {
- ....
+ // ....
}
}
}
@@ -83,7 +83,7 @@ For more control, you can add debug configurations to `.zed/debug.json`. See bel
To debug a specific package, you can do so by setting the Delve mode to "debug". In this case "program" should be set to the package name.
-```json
+```json [debug]
[
{
"label": "Go (Delve)",
@@ -110,7 +110,7 @@ To debug a specific package, you can do so by setting the Delve mode to "debug".
To debug the tests for a package, set the Delve mode to "test".
The "program" is still the package name, and you can use the "buildFlags" to do things like set tags, and the "args" to set args on the test binary. (See `go help testflags` for more information on doing that).
-```json
+```json [debug]
[
{
"label": "Run integration tests",
@@ -130,7 +130,7 @@ The "program" is still the package name, and you can use the "buildFlags" to do
If you need to build your application with a specific command, you can use the "exec" mode of Delve. In this case "program" should point to an executable,
and the "build" command should build that.
-```json
+```json [debug]
[
{
"label": "Debug Prebuilt Unit Tests",
@@ -160,7 +160,7 @@ and the "build" command should build that.
You might find yourself needing to connect to an existing instance of Delve that's not necessarily running on your machine; in such case, you can use `tcp_arguments` to instrument Zed's connection to Delve.
-```json
+```json [debug]
[
{
"adapter": "Delve",
@@ -172,7 +172,7 @@ You might find yourself needing to connect to an existing instance of Delve that
"request": "launch",
"mode": "exec",
"stopOnEntry": false,
- "tcp_connection": { "host": "123.456.789.012", "port": 53412 }
+ "tcp_connection": { "host": "127.0.0.1", "port": 53412 }
}
]
```
@@ -19,7 +19,7 @@ which haskell-language-server-wrapper
If you need to configure haskell-language-server (hls) you can add configuration options to your Zed settings.json:
-```json
+```json [settings]
{
"lsp": {
"hls": {
@@ -37,7 +37,7 @@ See the official [configuring haskell-language-server](https://haskell-language-
If you would like to use a specific hls binary, or perhaps use [static-ls](https://github.com/josephsumabat/static-ls) as a drop-in replacement instead, you can specify the binary path and arguments:
-```json
+```json [settings]
{
"lsp": {
"hls": {
@@ -9,7 +9,7 @@ Support for Helm in Zed is provided by the community-maintained [Helm extension]
Enable Helm language for Helm files by editing your `.zed/settings.json` and adding:
-```json
+```json [settings]
"file_types": {
"Helm": [
"**/templates/**/*.tpl",
@@ -7,7 +7,7 @@ HTML support is available through the [HTML extension](https://github.com/zed-in
This extension is automatically installed, but if you do not want to use it, you can add the following to your settings:
-```json
+```json [settings]
{
"auto_install_extensions": {
"html": false
@@ -21,7 +21,7 @@ By default Zed uses [Prettier](https://prettier.io/) for formatting HTML.
You can disable `format_on_save` by adding the following to your Zed `settings.json`:
-```json
+```json [settings]
"languages": {
"HTML": {
"format_on_save": "off",
@@ -35,7 +35,7 @@ You can still trigger formatting manually with {#kb editor::Format} or by openin
To use the `vscode-html-language-server` language server auto-formatting instead of Prettier, add the following to your Zed settings:
-```json
+```json [settings]
"languages": {
"HTML": {
"formatter": "language_server",
@@ -45,7 +45,7 @@ To use the `vscode-html-language-server` language server auto-formatting instead
You can customize various [formatting options](https://code.visualstudio.com/docs/languages/html#_formatting) for `vscode-html-language-server` via your Zed `settings.json`:
-```json
+```json [settings]
"lsp": {
"vscode-html-language-server": {
"settings": {
@@ -31,7 +31,7 @@ You can add these customizations to your Zed Settings by launching {#action zed:
### Zed Java Settings
-```json
+```json [settings]
{
"lsp": {
"jdtls": {
@@ -47,7 +47,7 @@ You can add these customizations to your Zed Settings by launching {#action zed:
By default, zed will look in your `PATH` for a `jdtls` binary, if you wish to specify an explicit binary you can do so via settings:
-```json
+```json [settings]
"lsp": {
"jdtls": {
"binary": {
@@ -64,7 +64,7 @@ By default, zed will look in your `PATH` for a `jdtls` binary, if you wish to sp
There are also many more options you can pass directly to the language server, for example:
-```json
+```json [settings]
{
"lsp": {
"jdtls": {
@@ -15,7 +15,7 @@ See [the configuration docs](../configuring-zed.md) for more information.
For example, if you have Prettier installed and on your `PATH`, you can use it to format JavaScript files by adding the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"JavaScript": {
@@ -45,7 +45,7 @@ Zed uses [tree-sitter/tree-sitter-jsdoc](https://github.com/tree-sitter/tree-sit
You can configure Zed to format code using `eslint --fix` by running the ESLint code action when formatting:
-```json
+```json [settings]
{
"languages": {
"JavaScript": {
@@ -59,7 +59,7 @@ You can configure Zed to format code using `eslint --fix` by running the ESLint
You can also only execute a single ESLint rule when using `fixAll`:
-```json
+```json [settings]
{
"languages": {
"JavaScript": {
@@ -88,14 +88,12 @@ You can also only execute a single ESLint rule when using `fixAll`:
If you **only** want to run ESLint on save, you can configure code actions as
the formatter:
-```json
+```json [settings]
{
"languages": {
"JavaScript": {
"formatter": {
- "code_actions": {
- "source.fixAll.eslint": true
- }
+ "code_action": "source.fixAll.eslint"
}
}
}
@@ -106,7 +104,7 @@ the formatter:
You can configure ESLint's `nodePath` setting:
-```json
+```json [settings]
{
"lsp": {
"eslint": {
@@ -124,7 +122,7 @@ You can configure ESLint's `problems` setting.
For example, here's how to set `problems.shortenToSingleLine`:
-```json
+```json [settings]
{
"lsp": {
"eslint": {
@@ -142,7 +140,7 @@ For example, here's how to set `problems.shortenToSingleLine`:
You can configure ESLint's `rulesCustomizations` setting:
-```json
+```json [settings]
{
"lsp": {
"eslint": {
@@ -161,7 +159,7 @@ You can configure ESLint's `rulesCustomizations` setting:
You can configure ESLint's `workingDirectory` setting:
-```json
+```json [settings]
{
"lsp": {
"eslint": {
@@ -191,7 +189,7 @@ If your use-case isn't covered by any of these, you can take full control by add
### Debug the current file
-```json
+```json [debug]
[
{
"adapter": "JavaScript",
@@ -208,7 +206,7 @@ This implicitly runs the current file using `node`.
### Launch a web app in Chrome
-```json
+```json [debug]
[
{
"adapter": "JavaScript",
@@ -16,7 +16,7 @@ If you use files with the `*.jsonc` extension when using `Format Document` or ha
To workaround this behavior you can add the following to your `.prettierrc` configuration file:
-```json
+```json [settings]
{
"overrides": [
{
@@ -40,7 +40,7 @@ To specify a schema inline with your JSON files, add a `$schema` top level key l
For example to for a `.luarc.json` for use with [lua-language-server](https://github.com/LuaLS/lua-language-server/):
-```json
+```json [settings]
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"runtime.version": "Lua 5.4"
@@ -53,7 +53,7 @@ You can alternatively associate JSON Schemas with file paths by via Zed LSP sett
To
-```json
+```json [settings]
"lsp": {
"json-language-server": {
"settings": {
@@ -11,7 +11,7 @@ Workspace configuration options can be passed to the language server via the `ls
The following example enables support for resolving [tanka](https://tanka.dev) import paths in `jsonnet-language-server`:
-```json
+```json [settings]
{
"lsp": {
"jsonnet-language-server": {
@@ -20,7 +20,7 @@ under `class Configuration` and initialization_options under `class Initializati
The following example changes the JVM target from `default` (which is 1.8) to
`17`:
-```json
+```json [settings]
{
"lsp": {
"kotlin-language-server": {
@@ -40,7 +40,7 @@ The following example changes the JVM target from `default` (which is 1.8) to
To use a specific java installation, just specify the `JAVA_HOME` environment variable with:
-```json
+```json [settings]
{
"lsp": {
"kotlin-language-server": {
@@ -9,7 +9,7 @@ Lua support is available through the [Lua extension](https://github.com/zed-exte
To configure LuaLS you can create a `.luarc.json` file in the root of your workspace.
-```json
+```json [settings]
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"runtime.version": "Lua 5.4",
@@ -55,7 +55,7 @@ cd .. && git clone https://github.com/notpeter/playdate-luacats
Then in your `.luarc.json`:
-```json
+```json [settings]
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"runtime.version": "Lua 5.4",
@@ -90,7 +90,7 @@ To enable [Inlay Hints](../configuring-languages.md#inlay-hints) for LuaLS in Ze
1. Add the following to your Zed settings.json:
-```json
+```json [settings]
"languages": {
"Lua": {
"inlay_hints": {
@@ -111,7 +111,7 @@ To enable [Inlay Hints](../configuring-languages.md#inlay-hints) for LuaLS in Ze
To enable auto-formatting with your LuaLS (provided by [CppCXY/EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle)) make sure you have `"format.enable": true,` in your .luarc.json:
-```json
+```json [settings]
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"format.enable": true
@@ -120,7 +120,7 @@ To enable auto-formatting with your LuaLS (provided by [CppCXY/EmmyLuaCodeStyle]
Then add the following to your Zed `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Lua": {
@@ -140,7 +140,7 @@ Alternatively to use [StyLua](https://github.com/JohnnyMorganz/StyLua) for auto-
1. Install [StyLua](https://github.com/JohnnyMorganz/StyLua): `brew install stylua` or `cargo install stylua --features lua52,lua53,lua54,luau,luajit` (feel free to remove any Lua versions you don't need).
2. Add the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Lua": {
@@ -27,7 +27,7 @@ cargo install stylua --features lua52,lua53,lua54,luau
Then add the following to your Zed `settings.json`:
-```json
+```json [settings]
"languages": {
"Luau": {
"formatter": {
@@ -25,7 +25,7 @@ def fib(n):
Zed supports using Prettier to automatically re-format Markdown documents. You can trigger this manually via the {#action editor::Format} action or via the {#kb editor::Format} keyboard shortcut. Alternately, you can automatically format by enabling [`format_on_save`](../configuring-zed.md#format-on-save) in your settings.json:
-```json
+```json [settings]
"languages": {
"Markdown": {
"format_on_save": "on"
@@ -37,7 +37,7 @@ Zed supports using Prettier to automatically re-format Markdown documents. You c
By default Zed will remove trailing whitespace on save. If you rely on invisible trailing whitespace being converted to `<br />` in Markdown files you can disable this behavior with:
-```json
+```json [settings]
"languages": {
"Markdown": {
"remove_trailing_whitespace_on_save": false
@@ -10,7 +10,7 @@ Report issues to: [https://github.com/foxoman/zed-nim/issues](https://github.com
To use [arnetheduck/nph](https://github.com/arnetheduck/nph) as a formatter, follow the [nph installation instructions](https://github.com/arnetheduck/nph?tab=readme-ov-file#installation) and add this to your Zed `settings.json`:
-```json
+```json [settings]
"languages": {
"Nim": {
"formatter": {
@@ -31,7 +31,7 @@ which php
To switch to `intelephense`, add the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"PHP": {
@@ -43,7 +43,7 @@ To switch to `intelephense`, add the following to your `settings.json`:
To use the premium features, you can place your [licence.txt file](https://intelephense.com/faq.html) at `~/intelephense/licence.txt` inside your home directory. Alternatively, you can pass the licence key or a path to a file containing the licence key as an initialization option for the `intelephense` language server. To do this, add the following to your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"intelephense": {
@@ -24,7 +24,7 @@ The Zed PowerShell extensions will attempt to download [PowerShell Editor Servic
If want to use a specific binary, you can specify in your that in your Zed settings.json:
-```json
+```json [settings]
"lsp": {
"powershell-es": {
"binary": {
@@ -30,7 +30,7 @@ which protols
## Configuration
-```json
+```json [settings]
"lsp": {
"protobuf-language-server": {
"binary": {
@@ -62,7 +62,7 @@ ColumnLimit: 120
Or you can have zed directly invoke `clang-format` by specifying it as a [formatter](https://zed.dev/docs/configuring-zed#formatter) in your settings:
-```json
+```json [settings]
"languages": {
"Proto": {
"format_on_save": "on",
@@ -77,7 +77,7 @@ Other built-in language servers are:
These are disabled by default, but can be enabled in your settings. For example:
-```json
+```json [settings]
{
"languages": {
"Python": {
@@ -123,7 +123,7 @@ For example, in order to:
You can use the following configuration:
-```json
+```json [settings]
{
"lsp": {
"basedpyright": {
@@ -144,7 +144,7 @@ basedpyright reads project-specific configuration from the `pyrightconfig.json`
Here's an example `pyrightconfig.json` file that configures basedpyright to use the `strict` type-checking mode and not to issue diagnostics for any files in `__pycache__` directories:
-```json
+```json [settings]
{
"typeCheckingMode": "strict",
"ignore": ["**/__pycache__"]
@@ -194,7 +194,7 @@ Zed provides the [Ruff](https://docs.astral.sh/ruff/) formatter and linter for P
You can disable format-on-save for Python files in your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Python": {
@@ -206,7 +206,7 @@ You can disable format-on-save for Python files in your `settings.json`:
Alternatively, you can use the `black` command-line tool for Python formatting, while keeping Ruff enabled for linting:
-```json
+```json [settings]
{
"languages": {
"Python": {
@@ -228,7 +228,7 @@ Like basedpyright, Ruff reads options from both Zed's language server settings a
Here's an example of using language server settings in Zed's `settings.json` to disable all Ruff lints in Zed (while still using Ruff as a formatter):
-```json
+```json [settings]
{
"lsp": {
"ruff": {
@@ -277,7 +277,7 @@ For reusable setups, create a `.zed/debug.json` file in your project root. This
#### Debug Active File
-```json
+```json [debug]
[
{
"label": "Python Active File",
@@ -309,7 +309,7 @@ requirements.txt
β¦the following configuration can be used:
-```json
+```json [debug]
[
{
"label": "Python: Flask",
@@ -72,7 +72,7 @@ You can configure the [R languageserver settings](https://github.com/REditorSupp
For example to disable Lintr linting and suppress code snippet suggestions (both enabled by default):
-```json
+```json [settings]
{
"lsp": {
"r_language_server": {
@@ -46,7 +46,7 @@ For all supported Ruby language servers (`solargraph`, `ruby-lsp`, `rubocop`, `s
You can skip step 1 and force using the system executable by setting `use_bundler` to `false` in your settings:
-```json
+```json [settings]
{
"lsp": {
"<SERVER_NAME>": {
@@ -66,7 +66,7 @@ You can skip step 1 and force using the system executable by setting `use_bundle
To switch to `ruby-lsp`, add the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -84,7 +84,7 @@ The Ruby extension also provides support for `rubocop` language server for offen
To enable it, add the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -96,7 +96,7 @@ To enable it, add the following to your `settings.json`:
Or, conversely, you can disable `ruby-lsp` and enable `solargraph` and `rubocop` by adding the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -110,7 +110,7 @@ Or, conversely, you can disable `ruby-lsp` and enable `solargraph` and `rubocop`
Solargraph has formatting and diagnostics disabled by default. We can tell Zed to enable them by adding the following to your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"solargraph": {
@@ -131,7 +131,7 @@ Solargraph reads its configuration from a file called `.solargraph.yml` in the r
You can pass Ruby LSP configuration to `initialization_options`, e.g.
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -152,7 +152,7 @@ You can pass Ruby LSP configuration to `initialization_options`, e.g.
LSP `settings` and `initialization_options` can also be project-specific. For example to use [standardrb/standard](https://github.com/standardrb/standard) as a formatter and linter for a particular project, add this to a `.zed/settings.json` inside your project repo:
-```json
+```json [settings]
{
"lsp": {
"ruby-lsp": {
@@ -169,7 +169,7 @@ LSP `settings` and `initialization_options` can also be project-specific. For ex
Rubocop has unsafe autocorrection disabled by default. We can tell Zed to enable it by adding the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -200,7 +200,7 @@ Rubocop has unsafe autocorrection disabled by default. We can tell Zed to enable
To enable Sorbet, add `\"sorbet\"` to the `language_servers` list for Ruby in your `settings.json`. You may want to disable other language servers if Sorbet is intended to be your primary LSP, or if you plan to use it alongside another LSP for specific features like type checking.
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -224,7 +224,7 @@ For all aspects of installing Sorbet, setting it up in your project, and configu
To enable Steep, add `\"steep\"` to the `language_servers` list for Ruby in your `settings.json`. You may need to adjust the order or disable other LSPs depending on your desired setup.
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -250,7 +250,7 @@ It's possible to use the [Tailwind CSS Language Server](https://github.com/tailw
In order to do that, you need to configure the language server so that it knows about where to look for CSS classes in Ruby/ERB files by adding the following to your `settings.json`:
-```json
+```json [settings]
{
"languages": {
"Ruby": {
@@ -294,7 +294,7 @@ To run tests in your Ruby project, you can set up custom tasks in your local `.z
### Minitest with Rails
-```json
+```json [tasks]
[
{
"label": "test $ZED_RELATIVE_FILE -n /$ZED_CUSTOM_RUBY_TEST_NAME/",
@@ -315,7 +315,7 @@ To run tests in your Ruby project, you can set up custom tasks in your local `.z
Plain minitest does not support running tests by line number, only by name, so we need to use `$ZED_CUSTOM_RUBY_TEST_NAME` instead:
-```json
+```json [tasks]
[
{
"label": "-Itest $ZED_RELATIVE_FILE -n /$ZED_CUSTOM_RUBY_TEST_NAME/",
@@ -336,7 +336,7 @@ Plain minitest does not support running tests by line number, only by name, so w
### RSpec
-```json
+```json [tasks]
[
{
"label": "test $ZED_RELATIVE_FILE:$ZED_ROW",
@@ -358,7 +358,7 @@ The Ruby extension provides a debug adapter for debugging Ruby code. Zed's name
#### Debug a Ruby script
-```json
+```json [debug]
[
{
"label": "Debug current file",
@@ -372,7 +372,7 @@ The Ruby extension provides a debug adapter for debugging Ruby code. Zed's name
#### Debug Rails server
-```json
+```json [debug]
[
{
"label": "Debug Rails server",
@@ -394,15 +394,15 @@ The Ruby extension provides a debug adapter for debugging Ruby code. Zed's name
To format ERB templates, you can use the `erb-formatter` formatter. This formatter uses the [`erb-formatter`](https://rubygems.org/gems/erb-formatter) gem to format ERB templates.
-```jsonc
+```json [settings]
{
"HTML+ERB": {
"formatter": {
"external": {
"command": "erb-formatter",
- "arguments": ["--stdin-filename", "{buffer_path}"],
- },
- },
- },
+ "arguments": ["--stdin-filename", "{buffer_path}"]
+ }
+ }
+ }
}
```
@@ -16,7 +16,7 @@ TBD: Provide explicit examples not just `....`
The following configuration can be used to change the inlay hint settings for `rust-analyzer` in Rust:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -43,7 +43,7 @@ See [Inlay Hints](https://rust-analyzer.github.io/book/features.html#inlay-hints
The `rust-analyzer` target directory can be set in `initialization_options`:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -67,7 +67,7 @@ By default, Zed will try to find a `rust-analyzer` in your `$PATH` and try to us
If you want to install pre-release `rust-analyzer` version instead you can instruct Zed to do so by setting `pre_release` to `true` in your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -81,7 +81,7 @@ If you want to install pre-release `rust-analyzer` version instead you can instr
If you want to disable Zed looking for a `rust-analyzer` binary, you can set `ignore_system_version` to `true` in your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -95,7 +95,7 @@ If you want to disable Zed looking for a `rust-analyzer` binary, you can set `ig
If you want to use a binary in a custom location, you can specify a `path` and optional `arguments`:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -114,7 +114,7 @@ This `"path"` has to be an absolute path.
If you want rust-analyzer to provide diagnostics for a target other than your current platform (e.g. for windows when running on macOS) you can use the following Zed lsp settings:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -139,7 +139,7 @@ rustup target list --installed
Zed provides tasks using tree-sitter, but rust-analyzer has an LSP extension method for querying file-related tasks via LSP.
This is enabled by default and can be configured as
-```json
+```json [settings]
"lsp": {
"rust-analyzer": {
"enable_lsp_tasks": true,
@@ -191,7 +191,7 @@ Check on save feature is responsible for returning part of the diagnostics based
Consider more `rust-analyzer.cargo.` and `rust-analyzer.check.` and `rust-analyzer.diagnostics.` settings from the manual for more fine-grained configuration.
Here's a snippet for Zed settings.json (the language server will restart automatically after the `lsp.rust-analyzer` section is edited and saved):
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -225,7 +225,7 @@ Here's a snippet for Zed settings.json (the language server will restart automat
If you want rust-analyzer to analyze multiple Rust projects in the same folder that are not listed in `[members]` in the Cargo workspace,
you can list them in `linkedProjects` in the local project settings:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -241,7 +241,7 @@ you can list them in `linkedProjects` in the local project settings:
There's a way to get custom completion items from rust-analyzer, that will transform the code according to the snippet body:
-```json
+```json [settings]
{
"lsp": {
"rust-analyzer": {
@@ -300,7 +300,7 @@ For more control, you can add debug configurations to `.zed/debug.json`. See the
### Build binary then debug
-```json
+```json [debug]
[
{
"label": "Build & Debug native binary",
@@ -321,7 +321,7 @@ For more control, you can add debug configurations to `.zed/debug.json`. See the
When you use `cargo build` or `cargo test` as the build command, Zed can infer the path to the output binary.
-```json
+```json [debug]
[
{
"label": "Build & Debug native binary",
@@ -8,7 +8,7 @@ Shell Scripts (bash, zsh, dash, sh) are supported natively by Zed.
You can configure various settings for Shell Scripts in your Zed User Settings (`~/.config/zed/settings.json`) or Zed Project Settings (`.zed/settings.json`):
-```json
+```json [settings]
"languages": {
"Shell Script": {
"tab_size": 2,
@@ -41,7 +41,7 @@ shfmt --version
3. Configure Zed to automatically format Shell Scripts with `shfmt` on save:
-```json
+```json [settings]
"languages": {
"Shell Script": {
"format_on_save": "on",
@@ -23,7 +23,7 @@ sql-formatter --version
3. Configure Zed to automatically format SQL with `sql-formatter`:
-```json
+```json [settings]
"languages": {
"SQL": {
"formatter": {
@@ -44,7 +44,7 @@ You can add this to Zed project settings (`.zed/settings.json`) or via your Zed
Sql-formatter also allows more precise control by providing [sql-formatter configuration options](https://github.com/sql-formatter-org/sql-formatter#configuration-options). To provide these, create a `.sql-formatter.json` file in your project:
-```json
+```json [settings]
{
"language": "postgresql",
"tabWidth": 2,
@@ -55,7 +55,7 @@ Sql-formatter also allows more precise control by providing [sql-formatter confi
When using a `.sql-formatter.json` file you can use a more simplified set of Zed settings since the language need not be specified inline:
-```json
+```json [settings]
"languages": {
"SQL": {
"formatter": {
@@ -9,7 +9,7 @@ Svelte support is available through the [Svelte extension](https://github.com/ze
You can modify how certain styles, such as directives and modifiers, appear in attributes:
-```json
+```json [settings]
"syntax": {
// Styling for directives (e.g., `class:foo` or `on:click`) (the `on` or `class` part of the attribute).
"attribute.function": {
@@ -26,7 +26,7 @@ You can modify how certain styles, such as directives and modifiers, appear in a
When inlay hints is enabled in Zed, to make the language server send them back, Zed sets the following initialization options:
-```json
+```json [settings]
"inlayHints": {
"parameterNames": {
"enabled": "all",
@@ -53,16 +53,16 @@ When inlay hints is enabled in Zed, to make the language server send them back,
To override these settings, use the following:
-```json
+```json [settings]
"lsp": {
"svelte-language-server": {
"initialization_options": {
"configuration": {
"typescript": {
- ......
+ // ......
},
"javascript": {
- ......
+ // ......
}
}
}
@@ -22,7 +22,7 @@ The extension doesn't attempt to download `lldb-dap` if it's not found.
#### Build and debug a Swift binary
-```json
+```json [debug]
[
{
"label": "Debug Swift",
@@ -8,18 +8,18 @@ Zed has built-in support for Tailwind CSS autocomplete, linting, and hover previ
To configure the Tailwind CSS language server, refer [to the extension settings](https://github.com/tailwindlabs/tailwindcss-intellisense?tab=readme-ov-file#extension-settings) and add them to the `lsp` section of your `settings.json`:
-```jsonc
+```json [settings]
{
"lsp": {
"tailwindcss-language-server": {
"settings": {
"classFunctions": ["cva", "cx"],
"experimental": {
- "classRegex": ["[cls|className]\\s\\:\\=\\s\"([^\"]*)"],
- },
- },
- },
- },
+ "classRegex": ["[cls|className]\\s\\:\\=\\s\"([^\"]*)"]
+ }
+ }
+ }
+ }
}
```
@@ -40,7 +40,7 @@ Languages which can be used with Tailwind CSS in Zed:
Zed supports Prettier out of the box, which means that if you have the [Tailwind CSS Prettier plugin](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) installed, adding it to your Prettier configuration will make it work automatically:
-```json
+```json [settings]
// .prettierrc
{
"plugins": ["prettier-plugin-tailwindcss"]
@@ -13,7 +13,7 @@ TBD: Add example using `rootModulePaths` to match upstream example https://githu
The Terraform language server can be configured in your `settings.json`, e.g.:
-```json
+```json [settings]
{
"lsp": {
"terraform-ls": {
@@ -16,7 +16,7 @@ TBD: Document the difference between Language servers
By default Zed uses [vtsls](https://github.com/yioneko/vtsls) for TypeScript, TSX, and JavaScript files.
You can configure the use of [typescript-language-server](https://github.com/typescript-language-server/typescript-language-server) per language in your settings file:
-```json
+```json [settings]
{
"languages": {
"TypeScript": {
@@ -34,7 +34,7 @@ You can configure the use of [typescript-language-server](https://github.com/typ
Prettier will also be used for TypeScript files by default. To disable this:
-```json
+```json [settings]
{
"languages": {
"TypeScript": {
@@ -49,7 +49,7 @@ Prettier will also be used for TypeScript files by default. To disable this:
`vtsls` may run out of memory on very large projects. We default the limit to 8092 (8 GiB) vs. the default of 3072 but this may not be sufficient for you:
-```json
+```json [settings]
{
"lsp": {
"vtsls": {
@@ -70,7 +70,7 @@ Zed sets the following initialization options to make the language server send b
You can override these settings in your Zed `settings.json` when using `typescript-language-server`:
-```json
+```json [settings]
{
"lsp": {
"typescript-language-server": {
@@ -95,7 +95,7 @@ See [typescript-language-server inlayhints documentation](https://github.com/typ
When using `vtsls`:
-```json
+```json [settings]
{
"lsp": {
"vtsls": {
@@ -174,7 +174,7 @@ If your use-case isn't covered by any of these, you can take full control by add
Given an externally-ran web server (e.g., with `npx serve` or `npx live-server`) one can attach to it and open it with a browser.
-```json
+```json [debug]
[
{
"label": "Launch Chrome (TypeScript)",
@@ -8,7 +8,7 @@ XML support is available through the [XML extension](https://github.com/sweetppr
If you have additional file extensions that are not being automatically recognized as XML just add them to [file_types](../configuring-zed.md#file-types) in your Zed settings:
-```json
+```json [settings]
"file_types": {
"XML": ["rdf", "gpx", "kml"]
}
@@ -9,7 +9,7 @@ YAML support is available natively in Zed.
You can configure various [yaml-language-server settings](https://github.com/redhat-developer/yaml-language-server?tab=readme-ov-file#language-server-settings) by adding them to your Zed settings.json in a `yaml-language-server` block under the `lsp` key. For example:
-```json
+```json [settings]
"lsp": {
"yaml-language-server": {
"settings": {
@@ -38,7 +38,7 @@ By default, Zed uses Prettier for formatting YAML files.
You can customize the formatting behavior of Prettier. For example to use single-quotes in yaml files add the following to your `.prettierrc` configuration file:
-```json
+```json [settings]
{
"overrides": [
{
@@ -55,7 +55,7 @@ You can customize the formatting behavior of Prettier. For example to use single
To use `yaml-language-server` instead of Prettier for YAML formatting, add the following to your Zed `settings.json`:
-```json
+```json [settings]
"languages": {
"YAML": {
"formatter": "language_server"
@@ -79,7 +79,7 @@ on:
You can disable the automatic detection and retrieval of schemas from the JSON Schema if desired:
-```json
+```json [settings]
"lsp": {
"yaml-language-server": {
"settings": {
@@ -99,7 +99,7 @@ Yaml-language-server supports [custom tags](https://github.com/redhat-developer/
For example Amazon CloudFormation YAML uses a number of custom tags, to support these you can add the following to your settings.json:
-```json
+```json [settings]
"lsp": {
"yaml-language-server": {
"settings": {
@@ -35,7 +35,7 @@ The remote machine must be able to run Zed's server. The following platforms sho
The list of remote servers is stored in your settings file {#kb zed::OpenSettings}. You can edit this list using the Remote Projects dialog {#kb projects::OpenRemote}, which provides some robustness - for example it checks that the connection can be established before writing it to the settings file.
-```json
+```json [settings]
{
"ssh_connections": [
{
@@ -48,7 +48,7 @@ The list of remote servers is stored in your settings file {#kb zed::OpenSetting
Zed shells out to the `ssh` on your path, and so it will inherit any configuration you have in `~/.ssh/config` for the given host. That said, if you need to override anything you can configure the following additional options on each connection:
-```json
+```json [settings]
{
"ssh_connections": [
{
@@ -66,7 +66,7 @@ Zed shells out to the `ssh` on your path, and so it will inherit any configurati
There are two additional Zed-specific options per connection, `upload_binary_over_ssh` and `nickname`:
-```json
+```json [settings]
{
"ssh_connections": [
{
@@ -91,7 +91,7 @@ Additionally it's worth noting that while you can pass a password on the command
If you'd like to be able to connect to ports on your remote server from your local machine, you can configure port forwarding in your settings file. This is particularly useful for developing websites so you can load the site in your browser while working.
-```json
+```json [settings]
{
"ssh_connections": [
{
@@ -106,7 +106,7 @@ This will cause requests from your local machine to `localhost:8080` to be forwa
By default these ports are bound to localhost, so other computers in the same network as your development machine cannot access them. You can set the local_host to bind to a different interface, for example, 0.0.0.0 will bind to all local interfaces.
-```json
+```json [settings]
{
"ssh_connections": [
{
@@ -125,7 +125,7 @@ By default these ports are bound to localhost, so other computers in the same ne
These ports also default to the `localhost` interface on the remote host. If you need to change this, you can also set the remote host:
-```json
+```json [settings]
{
"ssh_connections": [
{
@@ -149,7 +149,7 @@ TBD: Improve Julia REPL instructions
Zed automatically detects the available kernels on your system. If you need to configure a different default kernel for a
language, you can assign a kernel for any supported language in your `settings.json`.
-```json
+```json [settings]
{
"jupyter": {
"kernel_selections": {
@@ -6,7 +6,7 @@ The snippets are located in `~/.config/zed/snippets` directory to which you can
## Example configuration
-```json
+```json [settings]
{
// Each snippet must have a name and body, but the prefix and description are optional.
// The prefix is used to trigger the snippet, but when omitted then the name is used.
@@ -44,7 +44,7 @@ The `feature_paths` option in `simple-completion-language-server` is disabled by
If you want to enable it you can add the following to your `settings.json`:
-```json
+```json [settings]
{
"lsp": {
"snippet-completion-server": {
@@ -2,7 +2,7 @@
Zed supports ways to spawn (and rerun) commands using its integrated terminal to output the results. These commands can read a limited subset of Zed state (such as a path to the file currently being edited or selected text).
-```json
+```json [tasks]
[
{
"label": "Example task",
@@ -89,7 +89,7 @@ These variables allow you to pull information from the current editor and use it
To use a variable in a task, prefix it with a dollar sign (`$`):
-```json
+```json [settings]
{
"label": "echo current file's path",
"command": "echo $ZED_FILE"
@@ -106,7 +106,7 @@ When working with paths containing spaces or other special characters, please en
For example, instead of this (which will fail if the path has a space):
-```json
+```json [settings]
{
"label": "stat current file",
"command": "stat $ZED_FILE"
@@ -115,7 +115,7 @@ For example, instead of this (which will fail if the path has a space):
Provide the following:
-```json
+```json [settings]
{
"label": "stat current file",
"command": "stat",
@@ -125,7 +125,7 @@ Provide the following:
Or explicitly include escaped quotes like so:
-```json
+```json [settings]
{
"label": "stat current file",
"command": "stat \"$ZED_FILE\""
@@ -137,7 +137,7 @@ Or explicitly include escaped quotes like so:
Task definitions with variables which are not present at the moment the task list is determined are filtered out.
For example, the following task will appear in the spawn modal only if there is a text selection:
-```json
+```json [settings]
{
"label": "selected text",
"command": "echo \"$ZED_SELECTED_TEXT\""
@@ -146,7 +146,7 @@ For example, the following task will appear in the spawn modal only if there is
Set default values to such variables to have such tasks always displayed:
-```json
+```json [settings]
{
"label": "selected text with default",
"command": "echo \"${ZED_SELECTED_TEXT:no text selected}\""
@@ -172,7 +172,7 @@ By default, tasks capture their variables into a context once, and this "resolve
This can be controlled with the `"reevaluate_context"` argument to the task: setting it to `true` will force the task to be reevaluated before each run.
-```json
+```json [keymap]
{
"context": "Workspace",
"bindings": {
@@ -185,7 +185,7 @@ This can be controlled with the `"reevaluate_context"` argument to the task: set
You can define your own keybindings for your tasks via an additional argument to `task::Spawn`. If you wanted to bind the aforementioned `echo current file's path` task to `alt-g`, you would add the following snippet in your [`keymap.json`](./key-bindings.md) file:
-```json
+```json [keymap]
{
"context": "Workspace",
"bindings": {
@@ -197,7 +197,7 @@ You can define your own keybindings for your tasks via an additional argument to
Note that these tasks can also have a 'target' specified to control where the spawned task should show up.
This could be useful for launching a terminal application that you want to use in the center area:
-```json
+```json [tasks]
// In tasks.json
{
"label": "start lazygit",
@@ -205,7 +205,7 @@ This could be useful for launching a terminal application that you want to use i
}
```
-```json
+```json [keymap]
// In keymap.json
{
"context": "Workspace",
@@ -228,7 +228,7 @@ Zed supports overriding the default action for inline runnable indicators via wo
To tag a task, add the runnable tag name to the `tags` field on the task template:
-```json
+```json [settings]
{
"label": "echo current file's path",
"command": "echo $ZED_FILE",
@@ -9,7 +9,7 @@ To enable or disable some or all telemetry types, open your `settings.json` file
Insert and tweak the following:
-```json
+```json [settings]
"telemetry": {
"diagnostics": false,
"metrics": false
@@ -20,7 +20,7 @@ Your selected theme is stored in your settings file. You can open your settings
By default, Zed maintains two themes: one for light mode and one for dark mode. You can set the mode to `"dark"` or `"light"` to ignore the current system mode.
-```json
+```json [settings]
{
"theme": {
"mode": "system",
@@ -36,7 +36,7 @@ To override specific attributes of a theme, use the `experimental.theme_override
For example, add the following to your `settings.json` if you wish to override the background color of the editor and display comments and doc comments as italics:
-```json
+```json [settings]
{
"experimental.theme_overrides": {
"editor.background": "#333",
@@ -39,7 +39,7 @@ If you missed this, you can toggle vim mode on or off anytime by opening the com
> **Note**: This command toggles the following property in your user settings:
>
-> ```json
+> ```json [settings]
> {
> "vim_mode": true
> }
@@ -219,7 +219,7 @@ These text objects implement the behavior of the [mini.ai](https://github.com/ec
To use these text objects, you need to add bindings to your keymap. Here's an example configuration that makes them available when using text object operators (`i` and `a`) or change-surrounds (`cs`):
-```json
+```json [settings]
{
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
"bindings": {
@@ -377,7 +377,7 @@ In this section, we'll learn how to customize the key bindings of Zed's vim mode
Zed's key bindings are evaluated only when the `"context"` property matches your location in the editor. For example, if you add key bindings to the `"Editor"` context, they will only work when you're editing a file. If you add key bindings to the `"Workspace"` context, they will work everywhere in Zed. Here's an example of a key binding that saves when you're editing a file:
-```json
+```json [settings]
{
"context": "Editor",
"bindings": {
@@ -388,12 +388,12 @@ Zed's key bindings are evaluated only when the `"context"` property matches your
Contexts are nested, so when you're editing a file, the context is the `"Editor"` context, which is inside the `"Pane"` context, which is inside the `"Workspace"` context. That's why any key bindings you add to the `"Workspace"` context will work when you're editing a file. Here's an example:
-```json
+```json [keymap]
// This key binding will work when you're editing a file. It comes built into Zed by default as the workspace: save command.
{
"context": "Workspace",
"bindings": {
- "ctrl-s": "file::Save"
+ "ctrl-s": "workspace::Save"
}
}
```
@@ -419,7 +419,7 @@ Vim mode adds several contexts to the `"Editor"` context:
Here's a template with useful vim mode contexts to help you customize your vim mode key bindings. You can copy it and integrate it into your user keymap.
-```json
+```json [keymap]
[
{
"context": "VimControl && !menu",
@@ -458,7 +458,7 @@ By default, you can navigate between the different files open in the editor with
But you cannot use the same shortcuts to move between all the editor docks (the terminal, project panel, assistant panel, ...). If you want to use the same shortcuts to navigate to the docks, you can add the following key bindings to your user keymap.
-```json
+```json [settings]
{
"context": "Dock",
"bindings": {
@@ -473,7 +473,7 @@ But you cannot use the same shortcuts to move between all the editor docks (the
Subword motion, which allows you to navigate and select individual words in camelCase or snake_case, is not enabled by default. To enable it, add these bindings to your keymap.
-```json
+```json [settings]
{
"context": "VimControl && !menu && vim_mode != operator",
"bindings": {
@@ -487,7 +487,7 @@ Subword motion, which allows you to navigate and select individual words in came
Vim mode comes with shortcuts to surround the selection in normal mode (`ys`), but it doesn't have a shortcut to add surrounds in visual mode. By default, `shift-s` substitutes the selection (erases the text and enters insert mode). To use `shift-s` to add surrounds in visual mode, you can add the following object to your keymap.
-```json
+```json [settings]
{
"context": "vim_mode == visual",
"bindings": {
@@ -498,7 +498,7 @@ Vim mode comes with shortcuts to surround the selection in normal mode (`ys`), b
In non-modal text editors, cursor navigation typically wraps when moving past line ends. Zed, however, handles this behavior exactly like Vim by default: the cursor stops at line boundaries. If you prefer your cursor to wrap between lines, override these keybindings:
-```json
+```json [settings]
// In VimScript, this would look like this:
// set whichwrap+=<,>,[,],h,l
{
@@ -514,7 +514,7 @@ In non-modal text editors, cursor navigation typically wraps when moving past li
The [Sneak motion](https://github.com/justinmk/vim-sneak) feature allows for quick navigation to any two-character sequence in your text. You can enable it by adding the following keybindings to your keymap. By default, the `s` key is mapped to `vim::Substitute`. Adding these bindings will override that behavior, so ensure this change aligns with your workflow preferences.
-```json
+```json [settings]
{
"context": "vim_mode == normal || vim_mode == visual",
"bindings": {
@@ -526,7 +526,7 @@ The [Sneak motion](https://github.com/justinmk/vim-sneak) feature allows for qui
The [vim-exchange](https://github.com/tommcdo/vim-exchange) feature does not have a default binding for visual mode, as the `shift-x` binding conflicts with the default `shift-x` binding for visual mode (`vim::VisualDeleteLine`). To assign the default vim-exchange binding, add the following keybinding to your keymap:
-```json
+```json [settings]
{
"context": "vim_mode == visual",
"bindings": {
@@ -539,7 +539,7 @@ The [vim-exchange](https://github.com/tommcdo/vim-exchange) feature does not hav
If you're using vim mode on Linux or Windows, you may find it overrides keybindings you can't live without: `ctrl+v` to paste, `ctrl+f` to search, etc. You can restore them by copying this data into your keymap:
-```json
+```json [keymap]
{
"context": "Editor && !menu",
"bindings": {
@@ -572,7 +572,7 @@ You can change the following settings to modify vim mode's behavior:
Here's an example of adding a digraph for the zombie emoji. This allows you to type `ctrl-k f z` to insert a zombie emoji. You can add as many digraphs as you like.
-```json
+```json [settings]
{
"vim": {
"custom_digraphs": {
@@ -584,7 +584,7 @@ Here's an example of adding a digraph for the zombie emoji. This allows you to t
Here's an example of these settings changed:
-```json
+```json [settings]
{
"vim": {
"default_mode": "insert",
@@ -615,7 +615,7 @@ Here are a few general Zed settings that can help you fine-tune your Vim experie
Here's an example of these settings changed:
-```json
+```json [settings]
{
// Disable cursor blink
"cursor_blink": false,
@@ -10,7 +10,7 @@ Use may install zed extensions providing [Themes](./themes.md) and [Icon Themes]
You can preview/choose amongst your installed themes and icon themes with {#action theme_selector::Toggle} ({#kb theme_selector::Toggle}) and ({#action icon_theme_selector::Toggle}) which will modify the following settings:
-```json
+```json [settings]
{
"theme": "One Dark",
"icon_theme": "Zed (Default)"
@@ -19,26 +19,26 @@ You can preview/choose amongst your installed themes and icon themes with {#acti
If you would like to use distinct themes for light mode/dark mode that can be set with:
-```json
+```json [settings]
{
"theme": {
- "dark": "One Dark"
+ "dark": "One Dark",
"light": "One Light",
// Mode to use (dark, light) or "system" to follow the OS's light/dark mode (default)
- "mode": "system",
+ "mode": "system"
},
"icon_theme": {
- "dark": "Zed (Default)"
+ "dark": "Zed (Default)",
"light": "Zed (Default)",
// Mode to use (dark, light) or "system" to follow the OS's light/dark mode (default)
- "mode": "system",
+ "mode": "system"
}
}
```
## Fonts
-```json
+```json [settings]
// UI Font. Use ".SystemUIFont" to use the default system font (SF Pro on macOS),
// or ".ZedSans" for the bundled default (currently IBM Plex)
"ui_font_family": ".SystemUIFont",
@@ -73,7 +73,7 @@ For example `=>` will be displayed as `β` and `!=` will be `β `. This is pure
To disable this behavior use:
-```json
+```json [settings]
{
"buffer_font_features": {
"calt": false // Disable ligatures
@@ -83,7 +83,7 @@ To disable this behavior use:
### Status Bar
-```json
+```json [settings]
{
// Whether to show full labels in line indicator or short ones
// - `short`: "2 s, 15 l, 32 c"
@@ -105,7 +105,7 @@ To disable this behavior use:
### Titlebar
-```json
+```json [settings]
// Control which items are shown/hidden in the title bar
"title_bar": {
"show_branch_icon": false, // Show/hide branch icon beside branch switcher
@@ -120,7 +120,7 @@ To disable this behavior use:
## Workspace
-```json
+```json [settings]
{
// Force usage of Zed build in path prompts (file and directory pickers)
// instead of OS native pickers (false).
@@ -129,10 +129,6 @@ To disable this behavior use:
// instead of OS native prompts (false). On linux this is ignored (always false).
"use_system_prompts": true,
- // Whether to use the system provided dialogs for Open and Save As (true) or
- // Zed's built-in keyboard-first pickers (false)
- "use_system_path_prompts": true,
-
// Active pane styling settings.
"active_pane_modifiers": {
// Inset border size of the active pane, in pixels.
@@ -152,7 +148,7 @@ To disable this behavior use:
<!--
TBD: Centered layout related settings
-```json
+```json [settings]
"centered_layout": {
// The relative width of the left padding of the central pane from the
// workspace when the centered layout is used.
@@ -166,7 +162,7 @@ TBD: Centered layout related settings
## Editor
-```json
+```json [settings]
// Whether the cursor blinks in the editor.
"cursor_blink": true,
@@ -222,7 +218,7 @@ TBD: Centered layout related settings
### Git Blame {#editor-blame}
-```json
+```json [settings]
"git": {
"inline_blame": {
"enabled": true, // Show/hide inline blame
@@ -237,7 +233,7 @@ TBD: Centered layout related settings
### Editor Toolbar
-```json
+```json [settings]
// Editor toolbar related settings
"toolbar": {
"breadcrumbs": true, // Whether to show breadcrumbs.
@@ -250,7 +246,7 @@ TBD: Centered layout related settings
### Editor Scrollbar and Minimap {#editor-scrollbar}
-```json
+```json [settings]
// Scrollbar related settings
"scrollbar": {
// When to show the scrollbar in the editor (auto, system, always, never)
@@ -291,7 +287,7 @@ TBD: Centered layout related settings
### Editor Tabs
-```json
+```json [settings]
// Maximum number of tabs per pane. Unset for unlimited.
"max_tabs": null,
@@ -313,7 +309,7 @@ TBD: Centered layout related settings
### Status Bar
-```json
+```json [settings]
"status_bar": {
// Show/hide a button that displays the active buffer's language.
// Clicking the button brings up the language selector.
@@ -334,7 +330,7 @@ TBD: Centered layout related settings
### Multibuffer
-```json
+```json [settings]
{
// The default number of lines to expand excerpts in the multibuffer by.
"expand_excerpt_lines": 5,
@@ -345,7 +341,7 @@ TBD: Centered layout related settings
### Editor Completions, Snippets, Actions, Diagnostics {#editor-lsp}
-```json
+```json [settings]
"snippet_sort_order": "inline", // Snippets completions: top, inline, bottom, none
"show_completions_on_input": true, // Show completions while typing
"show_completion_documentation": true, // Show documentation in completions
@@ -367,7 +363,7 @@ TBD: Centered layout related settings
### Edit Predictions {#editor-ai}
-```json
+```json [settings]
"edit_predictions": {
"mode": "eager", // Automatically show (eager) or hold-alt (subtle)
"enabled_in_text_threads": true // Show/hide predictions in agent text threads
@@ -377,7 +373,7 @@ TBD: Centered layout related settings
### Editor Inlay Hints
-```json
+```json [settings]
{
"inlay_hints": {
"enabled": false,
@@ -408,7 +404,7 @@ TBD: Centered layout related settings
## File Finder
-```json
+```json [settings]
// File Finder Settings
"file_finder": {
"file_icons": true, // Show/hide file icons
@@ -422,7 +418,7 @@ TBD: Centered layout related settings
Project panel can be shown/hidden with {#action project_panel::ToggleFocus} ({#kb project_panel::ToggleFocus}) or with {#action pane::RevealInProjectPanel} ({#kb pane::RevealInProjectPanel}).
-```json
+```json [settings]
// Project Panel Settings
"project_panel": {
"button": true, // Show/hide button in the status bar
@@ -448,12 +444,12 @@ Project panel can be shown/hidden with {#action project_panel::ToggleFocus} ({#k
},
// Whether to hide the root entry when only one folder is open in the window.
"hide_root": false
- }.
+ }
```
## Agent Panel
-```json
+```json [settings]
"agent": {
"version": "2",
"enabled": true, // Enable/disable the agent
@@ -469,7 +465,7 @@ See [Zed AI Documentation](./ai/overview.md) for additional non-visual AI settin
## Terminal Panel
-```json
+```json [settings]
// Terminal Panel Settings
"terminal": {
"dock": "bottom", // Where to dock: left, right, bottom
@@ -506,7 +502,7 @@ See [Terminal settings](./configuring-zed.md#terminal) for additional non-visual
### Other Panels
-```json
+```json [settings]
// Git Panel
"git_panel": {
"button": true, // Show/hide status bar icon
@@ -547,15 +543,15 @@ See [Terminal settings](./configuring-zed.md#terminal) for additional non-visual
## Collaboration Panels
-```json
+```json [settings]
{
// Collaboration Panel
"collaboration_panel": {
- "button": true, // Show/hide status bar icon
- "dock": "left", // Where to dock: left, right
- "default_width": 240 // Default width of the collaboration panel.
+ "button": true, // Show/hide status bar icon
+ "dock": "left", // Where to dock: left, right
+ "default_width": 240 // Default width of the collaboration panel.
},
- "show_call_status_icon": true, // Shown call status in the OS status bar.
+ "show_call_status_icon": true, // Shown call status in the OS status bar.
// Notification Panel
"notification_panel": {
@@ -566,4 +562,5 @@ See [Terminal settings](./configuring-zed.md#terminal) for additional non-visual
// Default width of the notification panel.
"default_width": 380
}
+}
```
@@ -17,7 +17,7 @@ The naming convention of these databases takes on the form of `0-<zed_channel>`:
You can customize workspace restoration behavior with the following settings:
-```json
+```json [settings]
{
// Workspace restoration behavior.
// All workspaces ("last_session"), last workspace ("last_workspace") or "none"