Configuring Zed - Zed (original) (raw)

Zed is designed to be configured: we want to fit your workflow and preferences exactly. We provide default settings that are designed to be a comfortable starting point for as many people as possible, but we hope you will enjoy tweaking it to make it feel incredible.

In addition to the settings described here, you may also want to change your theme, configure your key bindings, set up tasks or install extensions.

Settings files

Your settings file can be opened with cmd-,|ctrl-,. By default it is located at ~/.config/zed/settings.json, though if you have XDG_CONFIG_HOME in your environment on Linux it will be at $XDG_CONFIG_HOME/zed/settings.json instead.

This configuration is merged with any local configuration inside your projects. You can open the project settings by running zed: open project settings from the command palette. This will create a .zed directory containing.zed/settings.json.

Although most projects will only need one settings file at the root, you can add more local settings files for subdirectories as needed. Not all settings can be set in local files, just those that impact the behavior of the editor and language tooling. For example you can set tab_size, formatter etc. but not theme, vim_mode and similar.

The syntax for configuration files is a super-set of JSON that allows // comments.

Default settings

You can find the default settings for your current Zed by running zed: open default settings from the command palette.

Extensions that provide language servers may also provide default settings for those language servers.

Settings

Active Pane Modifiers

{
  "active_pane_modifiers": {
    "border_size": 0.0,
    "inactive_opacity": 1.0
  }
}

Border size

Options

Non-negative float values

Inactive Opacity

Options

float values

Bottom Dock Layout

Options

  1. Contain the bottom dock, giving the full height of the window to the left and right docks
{
  "bottom_dock_layout": "contained"
}
  1. Give the bottom dock the full width of the window, truncating the left and right docks
{
  "bottom_dock_layout": "full"
}
  1. Left align the bottom dock, truncating the left dock and giving the right dock the full height of the window
{
  "bottom_dock_layout": "left_aligned"
}
  1. Right align the bottom dock, giving the left dock the full height of the window and truncating the right dock.
{
  "bottom_dock_layout": "right_aligned"
}

Auto Install extensions

Options

You can find the names of your currently installed extensions by listing the subfolders under the extension installation location:

On MacOS:

ls ~/Library/Application\ Support/Zed/extensions/installed/

On Linux:

ls ~/.local/share/zed/extensions/installed

Define extensions which should be installed (true) or never installed (false).

{
  "auto_install_extensions": {
    "html": true,
    "dockerfile": true,
    "docker-compose": false
  }
}

Autosave

Options

  1. To disable autosave, set it to off:
{
  "autosave": "off"
}
  1. To autosave when focus changes, use on_focus_change:
{
  "autosave": "on_focus_change"
}
  1. To autosave when the active window changes, use on_window_change:
{
  "autosave": "on_window_change"
}
  1. To autosave after an inactivity period, use after_delay:
{
  "autosave": {
    "after_delay": {
      "milliseconds": 1000
    }
  }
}

Restore on Startup

Options

  1. Restore all workspaces that were open when quitting Zed:
{
  "restore_on_startup": "last_session"
}
  1. Restore the workspace that was closed last:
{
  "restore_on_startup": "last_workspace"
}
  1. Always start with an empty editor:
{
  "restore_on_startup": "none"
}

Options

boolean values

Auto Update

Options

boolean values

Base Keymap

Options

  1. VSCode
{
  "base_keymap": "VSCode"
}
  1. Atom
{
  "base_keymap": "Atom"
}
  1. JetBrains
{
  "base_keymap": "JetBrains"
}
  1. None
{
  "base_keymap": "None"
}
  1. SublimeText
{
  "base_keymap": "SublimeText"
}
  1. TextMate
{
  "base_keymap": "TextMate"
}

Buffer Font Family

Options

The name of any font family installed on the user's system

Buffer Font Features

Options

Zed supports all OpenType features that can be enabled or disabled for a given buffer or terminal font, as well as setting values for font features.

For example, to disable font ligatures, add the following to your settings:

{
  "buffer_font_features": {
    "calt": false
  }
}

You can also set other OpenType features, like setting cv01 to 7:

{
  "buffer_font_features": {
    "cv01": 7
  }
}

Buffer Font Fallbacks

Options

For example, to use Nerd Font as a fallback, add the following to your settings:

{
  "buffer_font_fallbacks": ["Nerd Font"]
}

Buffer Font Size

Options

integer values from 6 to 100 pixels (inclusive)

Buffer Font Weight

Options

integer values between 100 and 900

Buffer Line Height

Options

"standard", "comfortable" or { "custom": float } (1 is compact, 2 is loose)

Close on File Delete

Options

boolean values

When enabled, this setting will automatically close tabs for files that have been deleted from the file system. This is particularly useful for workflows involving temporary or scratch files that are frequently created and deleted. When disabled (default), deleted files remain open with a strikethrough through their tab title.

Note: Dirty files (files with unsaved changes) will not be automatically closed even when this setting is enabled, ensuring you don't lose unsaved work.

Confirm Quit

Options

boolean values

Centered Layout

"centered_layout": {
  "left_padding": 0.2,
  "right_padding": 0.2,
}

Options

The left_padding and right_padding options define the relative width of the left and right padding of the central pane from the workspace when the centered layout mode is activated. Valid values range is from 0 to 0.4.

Direnv Integration

Options

There are two options to choose from:

  1. shell_hook: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
  2. direct: Use direnv export json to load direnv. This will load direnv directly without relying on the shell hook and might cause some inconsistencies. This allows direnv to work with any shell.

Edit Predictions

  "edit_predictions": {
    "disabled_globs": [
      "**/.env*",
      "**/*.pem",
      "**/*.key",
      "**/*.cert",
      "**/*.crt",
      "**/.dev.vars",
      "**/secrets.yml"
    ]
  }

Options

Disabled Globs

Options

List of string values.

Edit Predictions Disabled in

Options

List of string values

  1. Don't show edit predictions in comments:
"disabled_in": ["comment"]
  1. Don't show edit predictions in strings and comments:
"disabled_in": ["comment", "string"]
  1. Only in Go, don't show edit predictions in strings and comments:
{
  "languages": {
    "Go": {
      "edit_predictions_disabled_in": ["comment", "string"]
    }
  }
}

Current Line Highlight

Options

  1. Don't highlight the current line:
"current_line_highlight": "none"
  1. Highlight the gutter area:
"current_line_highlight": "gutter"
  1. Highlight the editor area:
"current_line_highlight": "line"
  1. Highlight the full line:
"current_line_highlight": "all"

Selection Highlight

LSP Highlight Debounce

Options

boolean values

Cursor Shape

Options

  1. A vertical bar:
"cursor_shape": "bar"
  1. A block that surrounds the following character:
"cursor_shape": "block"
  1. An underline / underscore that runs along the following character:
"cursor_shape": "underline"
  1. An box drawn around the following character:
"cursor_shape": "hollow"

Hide Mouse

Options

  1. Never hide the mouse cursor:
"hide_mouse": "never"
  1. Hide only when typing:
"hide_mouse": "on_typing"
  1. Hide on both typing and cursor movement:
"hide_mouse": "on_typing_and_movement"

Snippet Sort Order

Options

  1. Place snippets at the top of the completion list:
"snippet_sort_order": "top"
  1. Place snippets normally without any preference:
"snippet_sort_order": "inline"
  1. Place snippets at the bottom of the completion list:
"snippet_sort_order": "bottom"
"scrollbar": {
  "show": "auto",
  "cursors": true,
  "git_diff": true,
  "search_results": true,
  "selected_text": true,
  "selected_symbol": true,
  "diagnostics": "all",
  "axes": {
    "horizontal": true,
    "vertical": true,
  },
},

Show Mode

Options

  1. Show the scrollbar if there's important information or follow the system's configured behavior:
"scrollbar": {
  "show": "auto"
}
  1. Match the system's configured behavior:
"scrollbar": {
  "show": "system"
}
  1. Always show the scrollbar:
"scrollbar": {
  "show": "always"
}
  1. Never show the scrollbar:
"scrollbar": {
  "show": "never"
}

Cursor Indicators

Options

boolean values

Git Diff Indicators

Options

boolean values

Search Results Indicators

Options

boolean values

Selected Text Indicators

Options

boolean values

Selected Symbols Indicators

Options

boolean values

Diagnostics

Options

  1. Show all diagnostics:
{
  "diagnostics": "all"
}
  1. Do not show any diagnostics:
{
  "diagnostics": "none"
}
  1. Show only errors:
{
  "diagnostics": "error"
}
  1. Show only errors and warnings:
{
  "diagnostics": "warning"
}
  1. Show only errors, warnings, and information:
{
  "diagnostics": "information"
}

Axes

"scrollbar": {
  "axes": {
    "horizontal": true,
    "vertical": true,
  },
}

Horizontal

Options

boolean values

Vertical

Options

boolean values

Minimap

{
  "minimap": {
    "show": "never",
    "thumb": "always",
    "thumb_border": "left_open",
    "current_line_highlight": null
  }
}

Show Mode

Options

  1. Always show the minimap:
{
  "show": "always"
}
  1. Show the minimap if the editor's scrollbars are visible:
{
  "show": "auto"
}
  1. Never show the minimap:
{
  "show": "never"
}

Thumb Display

Options

  1. Show the minimap thumb when hovering over the minimap:
{
  "thumb": "hover"
}
  1. Always show the minimap thumb:
{
  "thumb": "always"
}

Thumb Border

Options

  1. Display a border on all sides of the thumb:
{
  "thumb_border": "full"
}
  1. Display a border on all sides except the left side:
{
  "thumb_border": "left_open"
}
  1. Display a border on all sides except the right side:
{
  "thumb_border": "right_open"
}
  1. Display a border only on the left side:
{
  "thumb_border": "left_only"
}
  1. Display the thumb without any border:
{
  "thumb_border": "none"
}

Current Line Highlight

Options

  1. Inherit the editor's current line highlight setting:
{
  "minimap": {
    "current_line_highlight": null
  }
}
  1. Highlight the current line in the minimap:
{
  "minimap": {
    "current_line_highlight": "line"
  }
}

or

{
  "minimap": {
    "current_line_highlight": "all"
  }
}
  1. Do not highlight the current line in the minimap:
{
  "minimap": {
    "current_line_highlight": "gutter"
  }
}

or

{
  "minimap": {
    "current_line_highlight": "none"
  }
}

Editor Tab Bar

"tab_bar": {
  "show": true,
  "show_nav_history_buttons": true,
  "show_tab_bar_buttons": true
}

Show

Options

boolean values

Options

boolean values

Tab Bar Buttons

Options

boolean values

Editor Tabs

"tabs": {
  "close_position": "right",
  "file_icons": false,
  "git_status": false,
  "activate_on_close": "history",
  "show_close_button": "hover",
  "show_diagnostics": "off"
},

Close Position

Options

  1. Display the close button on the right:
{
  "close_position": "right"
}
  1. Display the close button on the left:
{
  "close_position": "left"
}

File Icons

Git Status

Activate on close

Options

  1. Activate the tab that was open previously:
{
  "activate_on_close": "history"
}
  1. Activate the right neighbour tab if present:
{
  "activate_on_close": "neighbour"
}
  1. Activate the left neighbour tab if present:
{
  "activate_on_close": "left_neighbour"
}

Show close button

Options

  1. Show it just upon hovering the tab:
{
  "show_close_button": "hover"
}
  1. Show it persistently:
{
  "show_close_button": "always"
}
  1. Never show it, even if hovering it:
{
  "show_close_button": "hidden"
}

Show Diagnostics

Options

  1. Do not mark any files:
{
  "show_diagnostics": "off"
}
  1. Only mark files with errors:
{
  "show_diagnostics": "errors"
}
  1. Mark files with errors and warnings:
{
  "show_diagnostics": "all"
}

Show Inline Code Actions

Options

boolean values

Drag And Drop Selection

Options

boolean values

"toolbar": {
  "breadcrumbs": true,
  "quick_actions": true,
  "selections_menu": true,
  "agent_review": true,
  "code_actions": false
},

Options

Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.

Enable Language Server

Options

boolean values

Ensure Final Newline On Save

Options

boolean values

LSP

Options

The following settings can be overridden for specific language servers:

To override configuration for a language server, add an entry for that language server's name to the lsp value.

Some options are passed via initialization_options to the language server. These are for options which must be specified at language server startup and when changed will require restarting the language server.

For example to pass the check option to rust-analyzer, use the following configuration:

"lsp": {
  "rust-analyzer": {
    "initialization_options": {
      "check": {
        "command": "clippy" // rust-analyzer.check.command (default: "check")
      }
    }
  }
}

While other options may be changed at a runtime and should be placed under settings:

"lsp": {
  "yaml-language-server": {
    "settings": {
      "yaml": {
        "keyOrdering": true // Enforces alphabetical ordering of keys in maps
      }
    }
  }
}

LSP Highlight Debounce

Options

integer values representing milliseconds

Format On Save

Options

  1. on, enables format on save obeying formatter setting:
{
  "format_on_save": "on"
}
  1. off, disables format on save:
{
  "format_on_save": "off"
}

Formatter

Options

  1. To use the current language server, use "language_server":
{
  "formatter": "language_server"
}
  1. 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):
{
  "formatter": {
    "external": {
      "command": "sed",
      "arguments": ["-e", "s/ *$//"]
    }
  }
}
  1. External formatters may optionally include a {buffer_path} placeholder which at runtime will include the path of the buffer being formatted. Formatters operate by receiving file content via standard input, reformatting it and then outputting it to standard output and so normally don't know the filename of what they are formatting. Tools like Prettier support receiving the file path via a command line argument which can then used to impact formatting decisions.

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.

  "formatter": {
    "external": {
      "command": "prettier",
      "arguments": ["--stdin-filepath", "{buffer_path}"]
    }
  }
  1. Or to use code actions provided by the connected language servers, use "code_actions":
{
  "formatter": {
    "code_actions": {
      // Use ESLint's --fix:
      "source.fixAll.eslint": true,
      // Organize imports on save:
      "source.organizeImports": true
    }
  }
}
  1. Or to use multiple formatters consecutively, use an array of formatters:
{
  "formatter": [
    { "language_server": { "name": "rust-analyzer" } },
    {
      "external": {
        "command": "sed",
        "arguments": ["-e", "s/ *$//"]
      }
    }
  ]
}

Here rust-analyzer will be used first to format the code, followed by a call of sed. If any of the formatters fails, the subsequent ones will still be executed.

Code Actions On Format

Examples

  1. Organize imports on format in TypeScript and TSX buffers:
{
  "languages": {
    "TypeScript": {
      "code_actions_on_format": {
        "source.organizeImports": true
      }
    },
    "TSX": {
      "code_actions_on_format": {
        "source.organizeImports": true
      }
    }
  }
}
  1. Run ESLint fixAll code action when formatting:
{
  "languages": {
    "JavaScript": {
      "code_actions_on_format": {
        "source.fixAll.eslint": true
      }
    }
  }
}
  1. Run only a single ESLint rule when using fixAll:
{
  "languages": {
    "JavaScript": {
      "code_actions_on_format": {
        "source.fixAll.eslint": true
      }
    }
  },
  "lsp": {
    "eslint": {
      "settings": {
        "codeActionOnSave": {
          "rules": ["import/order"]
        }
      }
    }
  }
}

Auto close

Options

boolean values

Always Treat Brackets As Autoclosed

Options

boolean values

Example

If the setting is set to true:

  1. Enter in the editor: )))
  2. Move the cursor to the start: ^)))
  3. Enter again: )))

The result is still ))) and not )))))), which is what it would be by default.

File Scan Exclusions

"file_scan_exclusions": [
  "**/.git",
  "**/.svn",
  "**/.hg",
  "**/.jj",
  "**/CVS",
  "**/.DS_Store",
  "**/Thumbs.db",
  "**/.classpath",
  "**/.settings"
],

Note, specifying file_scan_exclusions in settings.json will override the defaults (shown above). If you are looking to exclude additional items you will need to include all the default values in your settings.

File Scan Inclusions

"file_scan_inclusions": [".env*"],

File Types

"file_types": {
  "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
  "Shell Script": [".env.*"]
}

Examples

To interpret all .c files as C++, files called MyLockFile as TOML and files starting with Dockerfile as Dockerfile:

{
  "file_types": {
    "C++": ["c"],
    "TOML": ["MyLockFile"],
    "Dockerfile": ["Dockerfile*"]
  }
}

Diagnostics

{
  "diagnostics": {
    "include_warnings": true,
    "inline": {
      "enabled": false
    },
    "update_with_cursor": false,
    "primary_only": false,
    "use_rendered": false
  }
}

Inline Diagnostics

{
  "diagnostics": {
    "inline": {
      "enabled": false,
      "update_debounce_ms": 150,
      "padding": 4,
      "min_column": 0,
      "max_severity": null
    }
  }
}

Options

  1. Enable inline diagnostics.
{
  "diagnostics": {
    "inline": {
      "enabled": true
    }
  }
}
  1. Delay diagnostic updates until some time after the last diagnostic update.
{
  "diagnostics": {
    "inline": {
      "enabled": true,
      "update_debounce_ms": 150
    }
  }
}
  1. Set padding between the end of the source line and the start of the diagnostic.
{
  "diagnostics": {
    "inline": {
      "enabled": true,
      "padding": 4
    }
  }
}
  1. Horizontally align inline diagnostics at the given column.
{
  "diagnostics": {
    "inline": {
      "enabled": true,
      "min_column": 80
    }
  }
}
  1. Show only warning and error diagnostics.
{
  "diagnostics": {
    "inline": {
      "enabled": true,
      "max_severity": "warning"
    }
  }
}

Git

{
  "git": {
    "git_gutter": "tracked_files",
    "inline_blame": {
      "enabled": true
    },
    "hunk_style": "staged_hollow"
  }
}

Git Gutter

Options

  1. Show git gutter in tracked files
{
  "git": {
    "git_gutter": "tracked_files"
  }
}
  1. Hide git gutter
{
  "git": {
    "git_gutter": "hide"
  }
}

Gutter Debounce

Options

integer values representing milliseconds

Example:

{
  "git": {
    "gutter_debounce": 100
  }
}

Inline Git Blame

{
  "git": {
    "inline_blame": {
      "enabled": true
    }
  }
}

Options

  1. Disable inline git blame:
{
  "git": {
    "inline_blame": {
      "enabled": false
    }
  }
}
  1. Only show inline git blame after a delay (that starts after cursor stops moving):
{
  "git": {
    "inline_blame": {
      "enabled": true,
      "delay_ms": 500
    }
  }
}
  1. Show a commit summary next to the commit date and author:
{
  "git": {
    "inline_blame": {
      "enabled": true,
      "show_commit_summary": true
    }
  }
}
  1. Use this as the minimum column at which to display inline blame information:
{
  "git": {
    "inline_blame": {
      "enabled": true,
      "min_column": 80
    }
  }
}

Hunk Style

{
  "git": {
    "hunk_style": "staged_hollow"
  }
}

Options

  1. Show the staged hunks faded out and with a border:
{
  "git": {
    "hunk_style": "staged_hollow"
  }
}
  1. Show unstaged hunks faded out and with a border:
{
  "git": {
    "hunk_style": "unstaged_hollow"
  }
}

Indent Guides

{
  "indent_guides": {
    "enabled": true,
    "line_width": 1,
    "active_line_width": 1,
    "coloring": "fixed",
    "background_coloring": "disabled"
  }
}

Options

  1. Disable indent guides
{
  "indent_guides": {
    "enabled": false
  }
}
  1. Enable indent guides for a specific language.
{
  "languages": {
    "Python": {
      "indent_guides": {
        "enabled": true
      }
    }
  }
}
  1. Enable indent aware coloring ("rainbow indentation"). The colors that are used for different indentation levels are defined in the theme (theme key: accents). They can be customized by using theme overrides.
{
  "indent_guides": {
    "enabled": true,
    "coloring": "indent_aware"
  }
}
  1. Enable indent aware background coloring ("rainbow indentation"). The colors that are used for different indentation levels are defined in the theme (theme key: accents). They can be customized by using theme overrides.
{
  "indent_guides": {
    "enabled": true,
    "coloring": "indent_aware",
    "background_coloring": "indent_aware"
  }
}

Hard Tabs

Options

boolean values

Multi Cursor Modifier

Options

  1. Maps to Alt on Linux and Windows and to Option on MacOS:
{
  "multi_cursor_modifier": "alt",
}
  1. Maps Control on Linux and Windows and to Command on MacOS:
{
  "multi_cursor_modifier": "cmd_or_ctrl", // alias: "cmd", "ctrl"
}

Hover Popover Enabled

Options

boolean values

Hover Popover Delay

Options

integer values representing milliseconds

Icon Theme

Icon Theme Object

"icon_theme": {
  "mode": "system",
  "dark": "Zed (Default)",
  "light": "Zed (Default)"
},

Mode

Options

  1. Set the icon theme to dark mode
{
  "mode": "dark"
}
  1. Set the icon theme to light mode
{
  "mode": "light"
}
  1. Set the icon theme to system mode
{
  "mode": "system"
}

Dark

Options

Run the icon theme selector: toggle action in the command palette to see a current list of valid icon themes names.

Light

Options

Run the icon theme selector: toggle action in the command palette to see a current list of valid icon themes names.

Inlay hints

"inlay_hints": {
  "enabled": false,
  "show_type_hints": true,
  "show_parameter_hints": true,
  "show_other_hints": true,
  "show_background": false,
  "edit_debounce_ms": 700,
  "scroll_debounce_ms": 50,
  "toggle_on_modifiers_press": null
}

Options

Inlay hints querying consists of two parts: editor (client) and LSP server. With the inlay settings above are changed to enable the hints, editor will start to query certain types of hints and react on LSP hint refresh request from the server. At this point, the server may or may not return hints depending on its implementation, further configuration might be needed, refer to the corresponding LSP server documentation.

The following languages have inlay hints preconfigured by Zed:

Use the lsp section for the server configuration. Examples are provided in the corresponding language documentation.

Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled. Settings-related hint updates are not debounced.

All possible config values for toggle_on_modifiers_press are:

"inlay_hints": {
  "toggle_on_modifiers_press": {
    "control": true,
    "shift": true,
    "alt": true,
    "platform": true,
    "function": true
  }
}

Unspecified values have a false value, hints won't be toggled if all the modifiers are false or not all the modifiers are pressed.

Journal

"journal": {
  "path": "~",
  "hour_format": "hour12"
}

Path

Options

string values

Hour Format

Options

  1. 12-hour format:
{
  "hour_format": "hour12"
}
  1. 24-hour format:
{
  "hour_format": "hour24"
}

Languages

Options

To override settings for a language, add an entry for that languages name to the languages value. Example:

"languages": {
  "C": {
    "format_on_save": "off",
    "preferred_line_length": 64,
    "soft_wrap": "preferred_line_length"
  },
  "JSON": {
    "tab_size": 4
  }
}

The following settings can be overridden for each specific language:

These values take in the same options as the root-level settings with the same name.

Network Proxy

Options

The proxy setting must contain a URL to the proxy.

The following URI schemes are supported:

http will be used when no scheme is specified.

By default no proxy will be used, or Zed will attempt to retrieve proxy settings from environment variables, such as http_proxy, HTTP_PROXY, https_proxy, HTTPS_PROXY, all_proxy, ALL_PROXY.

For example, to set an http proxy, add the following to your settings:

{
  "proxy": "http://127.0.0.1:10809"
}

Or to set a socks5 proxy:

{
  "proxy": "socks5h://localhost:10808"
}

Preview tabs

"preview_tabs": {
  "enabled": true,
  "enable_preview_from_file_finder": false,
  "enable_preview_from_code_navigation": false,
}

Enable preview from file finder

Options

boolean values

Enable preview from code navigation

Options

boolean values

File Finder

File Icons

Preferred Line Length

Options

integer values

Projects Online By Default

Options

boolean values

Remove Trailing Whitespace On Save

Options

boolean values

"search": {
  "whole_word": false,
  "case_sensitive": false,
  "include_ignored": false,
  "regex": false
},

Seed Search Query From Cursor

Options

  1. always always populate the search query with the word under the cursor
  2. selection only populate the search query when there is text selected
  3. never never populate the search query

Options

boolean values

Examples:

Show Call Status Icon

Options

boolean values

Completions

{
  "completions": {
    "words": "fallback",
    "lsp": true,
    "lsp_fetch_timeout_ms": 0,
    "lsp_insert_mode": "replace_suffix"
  }
}

Words

Options

  1. enabled - Always fetch document's words for completions along with LSP completions
  2. fallback - Only if LSP response errors or times out, use document's words to show completions
  3. disabled - Never fetch or complete document's words for completions (word-based completions can still be queried via a separate action)

LSP

Options

boolean values

LSP Fetch Timeout (ms)

Options

integer values representing milliseconds

LSP Insert Mode

Options

  1. insert - Replaces text before the cursor, using the insert range described in the LSP specification
  2. replace - Replaces text before and after the cursor, using the replace range described in the LSP specification
  3. replace_subsequence - Behaves like "replace" if the text that would be replaced is a subsequence of the completion text, and like "insert" otherwise
  4. replace_suffix - Behaves like "replace" if the text after the cursor is a suffix of the completion, and like "insert" otherwise

Show Completions On Input

Options

boolean values

Show Completion Documentation

Options

boolean values

Show Edit Predictions

Options

boolean values

Show Whitespaces

Options

  1. all
  2. selection
  3. none
  4. boundary

Soft Wrap

Options

  1. none to avoid wrapping generally, unless the line is too long
  2. prefer_line (deprecated, same as none)
  3. editor_width to wrap lines that overflow the editor width
  4. preferred_line_length to wrap lines that overflow preferred_line_length config value
  5. bounded to wrap lines at the minimum of editor_width and preferred_line_length

Wrap Guides (Vertical Rulers)

Options

List of integer column numbers

Tab Size

Options

integer values

Telemetry

"telemetry": {
  "diagnostics": true,
  "metrics": true
},

Options

Diagnostics

Options

boolean values

Metrics

Options

boolean values

Terminal

{
  "terminal": {
    "alternate_scroll": "off",
    "blinking": "terminal_controlled",
    "copy_on_select": false,
    "dock": "bottom",
    "default_width": 640,
    "default_height": 320,
    "detect_venv": {
      "on": {
        "directories": [".env", "env", ".venv", "venv"],
        "activate_script": "default"
      }
    },
    "env": {},
    "font_family": null,
    "font_features": null,
    "font_size": null,
    "line_height": "comfortable",
    "option_as_meta": false,
    "button": true,
    "shell": "system",
    "toolbar": {
      "breadcrumbs": true
    },
    "working_directory": "current_project_directory",
    "scrollbar": {
      "show": null
    }
  }
}

Terminal: Dock

Options

"bottom", "left" or "right"

Terminal: Alternate Scroll

Options

  1. Default alternate scroll mode to off
{
  "terminal": {
    "alternate_scroll": "off"
  }
}
  1. Default alternate scroll mode to on
{
  "terminal": {
    "alternate_scroll": "on"
  }
}

Terminal: Blinking

Options

  1. Never blink the cursor, ignore the terminal mode
{
  "terminal": {
    "blinking": "off"
  }
}
  1. Default the cursor blink to off, but allow the terminal to turn blinking on
{
  "terminal": {
    "blinking": "terminal_controlled"
  }
}
  1. Always blink the cursor, ignore the terminal mode
{
  "terminal": {
    "blinking": "on"
  }
}

Terminal: Copy On Select

Options

boolean values

Example

{
  "terminal": {
    "copy_on_select": true
  }
}

Terminal: Env

Example

{
  "terminal": {
    "env": {
      "ZED": "1",
      "KEY": "value1:value2"
    }
  }
}

Terminal: Font Size

Options

integer values

{
  "terminal": {
    "font_size": 15
  }
}

Terminal: Font Family

Options

The name of any font family installed on the user's system

{
  "terminal": {
    "font_family": "Berkeley Mono"
  }
}

Terminal: Font Features

Options

See Buffer Font Features

{
  "terminal": {
    "font_features": {
      "calt": false
      // See Buffer Font Features for more features
    }
  }
}

Terminal: Line Height

Options

  1. Use a line height that's comfortable for reading, 1.618. (default)
{
  "terminal": {
    "line_height": "comfortable"
  }
}
  1. Use a standard line height, 1.3. This option is useful for TUIs, particularly if they use box characters
{
  "terminal": {
    "line_height": "standard"
  }
}
  1. Use a custom line height.
{
  "terminal": {
    "line_height": {
      "custom": 2
    }
  }
}

Terminal: Option As Meta

Options

boolean values

{
  "terminal": {
    "option_as_meta": true
  }
}

Terminal: Shell

Options

  1. Use the system's default terminal configuration (usually the /etc/passwd file).
{
  "terminal": {
    "shell": "system"
  }
}
  1. A program to launch:
{
  "terminal": {
    "shell": {
      "program": "sh"
    }
  }
}
  1. A program with arguments:
{
  "terminal": {
    "shell": {
      "with_arguments": {
        "program": "/bin/bash",
        "args": ["--login"]
      }
    }
  }
}

Terminal: Detect Virtual Environments

{
  "terminal": {
    "detect_venv": {
      "on": {
        // Default directories to search for virtual environments, relative
        // to the current working directory. We recommend overriding this
        // in your project's settings, rather than globally.
        "directories": [".env", "env", ".venv", "venv"],
        // Can also be `csh`, `fish`, and `nushell`
        "activate_script": "default"
      }
    }
  }
}

Disable with:

{
  "terminal": {
    "detect_venv": "off"
  }
}
{
  "terminal": {
    "toolbar": {
      "breadcrumbs": true
    }
  }
}

Options

At the moment, only the breadcrumbs option is available, it controls displaying of the terminal title that can be changed via PROMPT_COMMAND.

If the terminal title is empty, the breadcrumbs won't be shown.

The shell running in the terminal needs to be configured to emit the title.

Example command to set the title: echo -e "\e]2;New Title\007";

Terminal: Button

Options

boolean values

{
  "terminal": {
    "button": false
  }
}

Terminal: Working Directory

Options

  1. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
{
  "terminal": {
    "working_directory": "current_project_directory"
  }
}
  1. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
{
  "terminal": {
    "working_directory": "first_project_directory"
  }
}
  1. Always use this platform's home directory (if we can find it)
{
  "terminal": {
    "working_directory": "always_home"
  }
}
  1. Always use a specific directory. This value will be shell expanded. If this path is not a valid directory the terminal will default to this platform's home directory.
{
  "terminal": {
    "working_directory": {
      "always": {
        "directory": "~/zed/projects/"
      }
    }
  }
}

Theme

Theme Object

"theme": {
  "mode": "system",
  "dark": "One Dark",
  "light": "One Light"
},

Mode

Options

  1. Set the theme to dark mode
{
  "mode": "dark"
}
  1. Set the theme to light mode
{
  "mode": "light"
}
  1. Set the theme to system mode
{
  "mode": "system"
}

Dark

Options

Run the theme selector: toggle action in the command palette to see a current list of valid themes names.

Light

Options

Run the theme selector: toggle action in the command palette to see a current list of valid themes names.

Vim

Project Panel

{
  "project_panel": {
    "button": true,
    "default_width": 240,
    "dock": "left",
    "entry_spacing": "comfortable",
    "file_icons": true,
    "folder_icons": true,
    "git_status": true,
    "indent_size": 20,
    "auto_reveal_entries": true,
    "auto_fold_dirs": true,
    "scrollbar": {
      "show": null
    },
    "show_diagnostics": "all",
    "indent_guides": {
      "show": "always"
    },
    "hide_root": false
  }
}

Dock

Options

  1. Default dock position to left
{
  "dock": "left"
}
  1. Default dock position to right
{
  "dock": "right"
}

Entry Spacing

Options

  1. Comfortable entry spacing
{
  "entry_spacing": "comfortable"
}
  1. Standard entry spacing
{
  "entry_spacing": "standard"
}

Git Status

Options

  1. Default enable git status
{
  "git_status": true
}
  1. Default disable git status
{
  "git_status": false
}

Default Width

Options

float values

Auto Reveal Entries

Options

  1. Enable auto reveal entries
{
  "auto_reveal_entries": true
}
  1. Disable auto reveal entries
{
  "auto_reveal_entries": false
}

Auto Fold Dirs

Options

  1. Enable auto fold dirs
{
  "auto_fold_dirs": true
}
  1. Disable auto fold dirs
{
  "auto_fold_dirs": false
}

Indent Size

Indent Guides: Show

"indent_guides": {
  "show": "always"
}

Options

  1. Show indent guides in the project panel
{
  "indent_guides": {
    "show": "always"
  }
}
  1. Hide indent guides in the project panel
{
  "indent_guides": {
    "show": "never"
  }
}

Scrollbar: Show

"scrollbar": {
  "show": null
}

Options

  1. Show scrollbar in the project panel
{
  "scrollbar": {
    "show": "always"
  }
}
  1. Hide scrollbar in the project panel
{
  "scrollbar": {
    "show": "never"
  }
}

Agent

"agent": {
  "version": "2",
  "enabled": true,
  "button": true,
  "dock": "right",
  "default_width": 640,
  "default_height": 320,
  "default_view": "thread",
  "default_model": {
    "provider": "zed.dev",
    "model": "claude-sonnet-4"
  },
  "single_file_review": true,
}

Outline Panel

"outline_panel": {
  "button": true,
  "default_width": 300,
  "dock": "left",
  "file_icons": true,
  "folder_icons": true,
  "git_status": true,
  "indent_size": 20,
  "auto_reveal_entries": true,
  "auto_fold_dirs": true,
  "indent_guides": {
    "show": "always"
  },
  "scrollbar": {
    "show": null
  }
}

Calls

"calls": {
  // Join calls with the microphone live by default
  "mute_on_join": false,
  // Share your project when you are the first to join a channel
  "share_on_join": false
},

Unnecessary Code Fade

Options

Float values between 0.0 and 0.9, where:

Example

{
  "unnecessary_code_fade": 0.5
}

UI Font Family

Options

The name of any font family installed on the system.

UI Font Features

"ui_font_features": {
  "calt": false
}

Options

Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.

For example, to disable font ligatures, add the following to your settings:

{
  "ui_font_features": {
    "calt": false
  }
}

You can also set other OpenType features, like setting cv01 to 7:

{
  "ui_font_features": {
    "cv01": 7
  }
}

UI Font Fallbacks

Options

For example, to use Nerd Font as a fallback, add the following to your settings:

{
  "ui_font_fallbacks": ["Nerd Font"]
}

UI Font Size

Options

integer values from 6 to 100 pixels (inclusive)

UI Font Weight

Options

integer values between 100 and 900

An example configuration:

// ~/.config/zed/settings.json
{
  "theme": "cave-light",
  "tab_size": 2,
  "preferred_line_length": 80,
  "soft_wrap": "none",

  "buffer_font_size": 18,
  "buffer_font_family": "Zed Plex Mono",

  "autosave": "on_focus_change",
  "format_on_save": "off",
  "vim_mode": false,
  "projects_online_by_default": true,
  "terminal": {
    "font_family": "FiraCode Nerd Font Mono",
    "blinking": "off"
  },
  "languages": {
    "C": {
      "format_on_save": "language_server",
      "preferred_line_length": 64,
      "soft_wrap": "preferred_line_length"
    }
  }
}