Configuring Zed
Folder-specific settings
Folder-specific settings are used to override Zed's global settings for files within a specific directory in the project panel. To get started, create a .zed subdirectory and add a settings.json within it. It should be noted that folder-specific settings don't need to live only at a project's root, but can be defined at multiple levels in the project hierarchy. In setups like this, Zed will find the configuration nearest to the file you are working in and apply those settings to it. In most cases, this level of flexibility won't be needed and a single configuration for all files in a project is all that is required; the Zed > Settings > Open Local Settings menu action is built for this case. Running this action will look for a .zed/settings.json file at the root of the first top-level directory in your project panel. If it does not exist, it will create it.
The following global settings can be overridden with a folder-specific configuration:
inline_completionsenable_language_serverensure_final_newline_on_saveformat_on_saveformatterhard_tabslanguagespreferred_line_lengthremove_trailing_whitespace_on_savesoft_wraptab_sizeshow_inline_completionsshow_whitespaces
See the Global settings section for details about these settings
Global settings
To get started with editing Zed's global settings, open ~/.config/zed/settings.json via ⌘ + ,, the command palette (zed: open settings), or the Zed > Settings > Open Settings application menu item.
Here are all the currently available settings.
Active Pane Magnification
- Description: Scale by which to zoom the active pane. When set to
1.0, the active pane has the same size as others, but when set to a larger value, the active pane takes up more space. - Setting:
active_pane_magnification - Default:
1.0
Options
float values
Autosave
- Description: When to automatically save edited buffers.
- Setting:
autosave - Default:
off
Options
- To disable autosave, set it to
off:
{
"autosave": "off"
}
- To autosave when focus changes, use
on_focus_change:
{
"autosave": "on_focus_change"
}
- To autosave when the active window changes, use
on_window_change:
{
"autosave": "on_window_change"
}
- To autosave after an inactivity period, use
after_delay:
{
"autosave": {
"after_delay": {
"milliseconds": 1000
}
}
}
Auto Update
- Description: Whether or not to automatically check for updates.
- Setting:
auto_update - Default:
true
Options
boolean values
Buffer Font Family
- Description: The name of a font to use for rendering text in the editor.
- Setting:
buffer_font_family - Default:
Zed Plex Mono
Options
The name of any font family installed on the user's system
Buffer Font Features
- Description: The OpenType features to enable for text in the editor.
- Setting:
buffer_font_features - Default:
null
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 Size
- Description: The default font size for text in the editor.
- Setting:
buffer_font_size - Default:
15
Options
integer values
Buffer Font Weight
- Description: The default font weight for text in the editor.
- Setting:
buffer_font_weight - Default:
400
Options
integer values between 100 and 900
Buffer Line Height
- Description: The default line height for text in the editor.
- Setting:
buffer_line_height - Default:
"comfortable"
Options
"standard", "comfortable" or {"custom": float} (1 is very compact, 2 very loose)
Confirm Quit
- Description: Whether or not to prompt the user to confirm before closing the application.
- Setting:
confirm_quit - Default:
false
Options
boolean values
Centered Layout
- Description: Configuration for the centered layout mode.
- Setting:
centered_layout - Default:
"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
- Description: Settings for direnv integration. Requires
direnvto be installed.direnvintegration currently only means that the environment variables set by adirenvconfiguration can be used to detect some language servers in$PATHinstead of installing them. - Setting:
load_direnv - Default:
"load_direnv": "shell_hook"
Options There are two options to choose from:
shell_hook: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.direct: Usedirenv export jsonto 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.
Inline Completions
- Description: Settings for inline completions.
- Setting:
inline_completions - Default:
"inline_completions": {
"disabled_globs": [
".env"
]
}
Options
Disabled Globs
- Description: A list of globs representing files that inline completions should be disabled for.
- Setting:
disabled_globs - Default: [".env"]
Options
List of string values
Current Line Highlight
- Description: How to highlight the current line in the editor.
- Setting:
current_line_highlight - Default:
all
Options
- Don't highlight the current line:
"current_line_highlight": "none"
- Highlight the gutter area:
"current_line_highlight": "gutter"
- Highlight the editor area:
"current_line_highlight": "line"
- Highlight the full line:
"current_line_highlight": "all"
Cursor Blink
- Description: Whether or not the cursor blinks.
- Setting:
cursor_blink - Default:
true
Options
boolean values
Default Dock Anchor
- Description: The default anchor for new docks.
- Setting:
default_dock_anchor - Default:
bottom
Options
- Position the dock attached to the bottom of the workspace:
bottom - Position the dock to the right of the workspace like a side panel:
right - Position the dock full screen over the entire workspace:
expanded
Editor Scrollbar
- Description: Whether or not to show the editor scrollbar and various elements in it.
- Setting:
scrollbar - Default:
"scrollbar": {
"show": "auto",
"cursors": true,
"git_diff": true,
"search_results": true,
"selected_symbol": true,
"diagnostics": true
},
Show Mode
- Description: When to show the editor scrollbar.
- Setting:
show - Default:
auto
Options
- Show the scrollbar if there's important information or follow the system's configured behavior:
"scrollbar": {
"show": "auto"
}
- Match the system's configured behavior:
"scrollbar": {
"show": "system"
}
- Always show the scrollbar:
"scrollbar": {
"show": "always"
}
- Never show the scrollbar:
"scrollbar": {
"show": "never"
}
Cursor Indicators
- Description: Whether to show cursor positions in the scrollbar.
- Setting:
cursors - Default:
true
Options
boolean values
Git Diff Indicators
- Description: Whether to show git diff indicators in the scrollbar.
- Setting:
git_diff - Default:
true
Options
boolean values
Search Results Indicators
- Description: Whether to show buffer search results in the scrollbar.
- Setting:
search_results - Default:
true
Options
boolean values
Selected Symbols Indicators
- Description: Whether to show selected symbol occurrences in the scrollbar.
- Setting:
selected_symbol - Default:
true
Options
boolean values
Diagnostics
- Description: Whether to show diagnostic indicators in the scrollbar.
- Setting:
diagnostics - Default:
true
Options
boolean values
Editor Tab Bar
- Description: Settings related to the editor's tab bar.
- Settings:
tab_bar - Default:
"tab_bar": {
"show": true,
"show_nav_history_buttons": true
}
Show
- Description: Whether or not to show the tab bar in the editor.
- Setting:
show - Default:
true
Options
boolean values
Navigation History Buttons
- Description: Whether or not to show the navigation history buttons.
- Setting:
show_nav_history_buttons - Default:
true
Options
boolean values
Editor Tabs
- Description: Configuration for the editor tabs.
- Setting:
tabs - Default:
"tabs": {
"close_position": "right",
"git_status": false
},
Close Position
- Description: Where to display close button within a tab.
- Setting:
close_position - Default:
right
Options
- Display the close button on the right:
{
"close_position": "right"
}
- Display the close button on the left:
{
"close_position": "left"
}
Git Status
- Description: Whether or not to show Git file status in tab.
- Setting:
git_status - Default:
false
Editor Toolbar
- Description: Whether or not to show various elements in the editor toolbar.
- Setting:
toolbar - Default:
"toolbar": {
"breadcrumbs": true,
"quick_actions": true
},
Options
Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
Enable Language Server
- Description: Whether or not to use language servers to provide code intelligence.
- Setting:
enable_language_server - Default:
true
Options
boolean values
Ensure Final Newline On Save
Lines 1–500 of 1662. Load more
# Configuring Zed ## Folder-specific settings Folder-specific settings are used to override Zed's global settings for files within a specific directory in the project panel. To get started, create a `.zed` subdirectory and add a `settings.json` within it. It should be noted that folder-specific settings don't need to live only at a project's root, but can be defined at multiple levels in the project hierarchy. In setups like this, Zed will find the configuration nearest to the file you are working in and apply those settings to it. In most cases, this level of flexibility won't be needed and a single configuration for all files in a project is all that is required; the `Zed > Settings > Open Local Settings` menu action is built for this case. Running this action will look for a `.zed/settings.json` file at the root of the first top-level directory in your project panel. If it does not exist, it will create it. The following global settings can be overridden with a folder-specific configuration: - `inline_completions` - `enable_language_server` - `ensure_final_newline_on_save` - `format_on_save` - `formatter` - `hard_tabs` - `languages` - `preferred_line_length` - `remove_trailing_whitespace_on_save` - `soft_wrap` - `tab_size` - `show_inline_completions` - `show_whitespaces` _See the Global settings section for details about these settings_ ## Global settings To get started with editing Zed's global settings, open `~/.config/zed/settings.json` via `⌘` + `,`, the command palette (`zed: open settings`), or the `Zed > Settings > Open Settings` application menu item. Here are all the currently available settings. ## Active Pane Magnification - Description: Scale by which to zoom the active pane. When set to `1.0`, the active pane has the same size as others, but when set to a larger value, the active pane takes up more space. - Setting: `active_pane_magnification` - Default: `1.0` **Options** `float` values ## Autosave - Description: When to automatically save edited buffers. - Setting: `autosave` - Default: `off` **Options** 1. To disable autosave, set it to `off`: ```json { "autosave": "off" } ``` 2. To autosave when focus changes, use `on_focus_change`: ```json { "autosave": "on_focus_change" } ``` 3. To autosave when the active window changes, use `on_window_change`: ```json { "autosave": "on_window_change" } ``` 4. To autosave after an inactivity period, use `after_delay`: ```json { "autosave": { "after_delay": { "milliseconds": 1000 } } } ``` ## Auto Update - Description: Whether or not to automatically check for updates. - Setting: `auto_update` - Default: `true` **Options** `boolean` values ## Buffer Font Family - Description: The name of a font to use for rendering text in the editor. - Setting: `buffer_font_family` - Default: `Zed Plex Mono` **Options** The name of any font family installed on the user's system ## Buffer Font Features - Description: The OpenType features to enable for text in the editor. - Setting: `buffer_font_features` - Default: `null` **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: ```json { "buffer_font_features": { "calt": false } } ``` You can also set other OpenType features, like setting `cv01` to `7`: ```json { "buffer_font_features": { "cv01": 7 } } ``` ## Buffer Font Size - Description: The default font size for text in the editor. - Setting: `buffer_font_size` - Default: `15` **Options** `integer` values ## Buffer Font Weight - Description: The default font weight for text in the editor. - Setting: `buffer_font_weight` - Default: `400` **Options** `integer` values between `100` and `900` ## Buffer Line Height - Description: The default line height for text in the editor. - Setting: `buffer_line_height` - Default: `"comfortable"` **Options** `"standard"`, `"comfortable"` or `{"custom": float}` (`1` is very compact, `2` very loose) ## Confirm Quit - Description: Whether or not to prompt the user to confirm before closing the application. - Setting: `confirm_quit` - Default: `false` **Options** `boolean` values ## Centered Layout - Description: Configuration for the centered layout mode. - Setting: `centered_layout` - Default: ```json "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 - Description: Settings for [direnv](https://direnv.net/) integration. Requires `direnv` to be installed. `direnv` integration currently only means that the environment variables set by a `direnv` configuration can be used to detect some language servers in `$PATH` instead of installing them. - Setting: `load_direnv` - Default: ```json "load_direnv": "shell_hook" ``` **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. ## Inline Completions - Description: Settings for inline completions. - Setting: `inline_completions` - Default: ```json "inline_completions": { "disabled_globs": [ ".env" ] } ``` **Options** ### Disabled Globs - Description: A list of globs representing files that inline completions should be disabled for. - Setting: `disabled_globs` - Default: [".env"] **Options** List of `string` values ## Current Line Highlight - Description: How to highlight the current line in the editor. - Setting: `current_line_highlight` - Default: `all` **Options** 1. Don't highlight the current line: ```json "current_line_highlight": "none" ``` 2. Highlight the gutter area: ```json "current_line_highlight": "gutter" ``` 3. Highlight the editor area: ```json "current_line_highlight": "line" ``` 4. Highlight the full line: ```json "current_line_highlight": "all" ``` ## Cursor Blink - Description: Whether or not the cursor blinks. - Setting: `cursor_blink` - Default: `true` **Options** `boolean` values ## Default Dock Anchor - Description: The default anchor for new docks. - Setting: `default_dock_anchor` - Default: `bottom` **Options** 1. Position the dock attached to the bottom of the workspace: `bottom` 2. Position the dock to the right of the workspace like a side panel: `right` 3. Position the dock full screen over the entire workspace: `expanded` ## Editor Scrollbar - Description: Whether or not to show the editor scrollbar and various elements in it. - Setting: `scrollbar` - Default: ```json "scrollbar": { "show": "auto", "cursors": true, "git_diff": true, "search_results": true, "selected_symbol": true, "diagnostics": true }, ``` ### Show Mode - Description: When to show the editor scrollbar. - Setting: `show` - Default: `auto` **Options** 1. Show the scrollbar if there's important information or follow the system's configured behavior: ```json "scrollbar": { "show": "auto" } ``` 2. Match the system's configured behavior: ```json "scrollbar": { "show": "system" } ``` 3. Always show the scrollbar: ```json "scrollbar": { "show": "always" } ``` 4. Never show the scrollbar: ```json "scrollbar": { "show": "never" } ``` ### Cursor Indicators - Description: Whether to show cursor positions in the scrollbar. - Setting: `cursors` - Default: `true` **Options** `boolean` values ### Git Diff Indicators - Description: Whether to show git diff indicators in the scrollbar. - Setting: `git_diff` - Default: `true` **Options** `boolean` values ### Search Results Indicators - Description: Whether to show buffer search results in the scrollbar. - Setting: `search_results` - Default: `true` **Options** `boolean` values ### Selected Symbols Indicators - Description: Whether to show selected symbol occurrences in the scrollbar. - Setting: `selected_symbol` - Default: `true` **Options** `boolean` values ### Diagnostics - Description: Whether to show diagnostic indicators in the scrollbar. - Setting: `diagnostics` - Default: `true` **Options** `boolean` values ## Editor Tab Bar - Description: Settings related to the editor's tab bar. - Settings: `tab_bar` - Default: ```json "tab_bar": { "show": true, "show_nav_history_buttons": true } ``` ### Show - Description: Whether or not to show the tab bar in the editor. - Setting: `show` - Default: `true` **Options** `boolean` values ### Navigation History Buttons - Description: Whether or not to show the navigation history buttons. - Setting: `show_nav_history_buttons` - Default: `true` **Options** `boolean` values ## Editor Tabs - Description: Configuration for the editor tabs. - Setting: `tabs` - Default: ```json "tabs": { "close_position": "right", "git_status": false }, ``` ### Close Position - Description: Where to display close button within a tab. - Setting: `close_position` - Default: `right` **Options** 1. Display the close button on the right: ```json { "close_position": "right" } ``` 2. Display the close button on the left: ```json { "close_position": "left" } ``` ### Git Status - Description: Whether or not to show Git file status in tab. - Setting: `git_status` - Default: `false` ## Editor Toolbar - Description: Whether or not to show various elements in the editor toolbar. - Setting: `toolbar` - Default: ```json "toolbar": { "breadcrumbs": true, "quick_actions": true }, ``` **Options** Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed. ## Enable Language Server - Description: Whether or not to use language servers to provide code intelligence. - Setting: `enable_language_server` - Default: `true` **Options** `boolean` values ## Ensure Final Newline On Save