Configuring Zed
Zed can be configured via a simple JSON file located at ~/.zed/settings.json
.
Opening your settings file
You can open ~/.zed/settings.json
via cmd-,
, the command palette, or the Zed > Open Settings
application menu item.
This file contains a JSON object and should look like this:
{
"theme": "rosé-pine",
"buffer_font_family": "PragmataPro Liga",
"buffer_font_size": 16
}
Add entries to a JSON object in this file and save it to configure Zed.
Available settings
Option | Default | Description |
---|---|---|
theme | cave-dark | Theme name Sets the startup theme. |
buffer_font_family | zed-mono | Font name The editor font family. |
buffer_font_size | 16 | Number The editor font size. |
tab_size | 4 | Number Spaces per tab. |
preferred_line_length | 80 | ? |
format_on_save | true | Boolean Formats open buffer on save. |
language_overrides | null | See Overrides below. |
soft_wrap | editor_width | editor_width , none , preferred_line_length |
vim_mode | false | Boolean Enables Vim mode (WIP - see Vim mode) |
projects_online_by_default | true | Boolean Project goes online when opened. |
Overrides
You can override settings for specific languages like this:
"language_overrides": {
"C": {
"format_on_save": false,
"preferred_line_length": 64,
"soft_wrap": "preferred_line_length"
},
"JSON": {
"tab_size": 4
}
}
For a complete list of languages you can override settings for see Supported Languages.
An example configuration:
// ~/.zed/settings.json
{
"theme": "cave-light",
"tab_size": 2,
"preferred_line_length": 80,
"soft_wrap": "none",
"buffer_font_size": 18,
"buffer_font_family": "Zed Mono",
"format_on_save": false,
"vim_mode": false,
"projects_online_by_default": true,
"language_overrides": {
"C": {
"format_on_save": false,
"preferred_line_length": 64,
"soft_wrap": "preferred_line_length"
}
}
}