default.json

  1{
  2  // The name of the Zed theme to use for the UI
  3  "theme": "One Dark",
  4  // Features that can be globally enabled or disabled
  5  "features": {
  6    // Show Copilot icon in status bar
  7    "copilot": true
  8  },
  9  // The name of a font to use for rendering text in the editor
 10  "buffer_font_family": "Zed Mono",
 11  // The OpenType features to enable for text in the editor.
 12  "buffer_font_features": {
 13    // Disable ligatures:
 14    // "calt": false
 15  },
 16  // The default font size for text in the editor
 17  "buffer_font_size": 15,
 18  // The factor to grow the active pane by. Defaults to 1.0
 19  // which gives the same size as all other panes.
 20  "active_pane_magnification": 1.0,
 21  // Whether to enable vim modes and key bindings
 22  "vim_mode": false,
 23  // Whether to show the informational hover box when moving the mouse
 24  // over symbols in the editor.
 25  "hover_popover_enabled": true,
 26  // Whether to confirm before quitting Zed.
 27  "confirm_quit": false,
 28  // Whether the cursor blinks in the editor.
 29  "cursor_blink": true,
 30  // Whether to pop the completions menu while typing in an editor without
 31  // explicitly requesting it.
 32  "show_completions_on_input": true,
 33  // Controls whether copilot provides suggestion immediately
 34  // or waits for a `copilot::Toggle`
 35  "show_copilot_suggestions": true,
 36  // Whether the screen sharing icon is shown in the os status bar.
 37  "show_call_status_icon": true,
 38  // Whether to use language servers to provide code intelligence.
 39  "enable_language_server": true,
 40  // When to automatically save edited buffers. This setting can
 41  // take four values.
 42  //
 43  // 1. Never automatically save:
 44  //     "autosave": "off",
 45  // 2. Save when changing focus away from the Zed window:
 46  //     "autosave": "on_window_change",
 47  // 3. Save when changing focus away from a specific buffer:
 48  //     "autosave": "on_focus_change",
 49  // 4. Save when idle for a certain amount of time:
 50  //     "autosave": { "after_delay": {"milliseconds": 500} },
 51  "autosave": "off",
 52  // Where to place the dock by default. This setting can take three
 53  // values:
 54  //
 55  // 1. Position the dock attached to the bottom of the workspace
 56  //     "default_dock_anchor": "bottom"
 57  // 2. Position the dock to the right of the workspace like a side panel
 58  //     "default_dock_anchor": "right"
 59  // 3. Position the dock full screen over the entire workspace"
 60  //     "default_dock_anchor": "expanded"
 61  "default_dock_anchor": "bottom",
 62  // Whether or not to remove any trailing whitespace from lines of a buffer
 63  // before saving it.
 64  "remove_trailing_whitespace_on_save": true,
 65  // Whether or not to ensure there's a single newline at the end of a buffer
 66  // when saving it.
 67  "ensure_final_newline_on_save": true,
 68  // Whether or not to perform a buffer format before saving
 69  "format_on_save": "on",
 70  // How to perform a buffer format. This setting can take two values:
 71  //
 72  // 1. Format code using the current language server:
 73  //     "format_on_save": "language_server"
 74  // 2. Format code using an external command:
 75  //     "format_on_save": {
 76  //       "external": {
 77  //         "command": "prettier",
 78  //         "arguments": ["--stdin-filepath", "{buffer_path}"]
 79  //       }
 80  //     }
 81  "formatter": "language_server",
 82  // How to soft-wrap long lines of text. This setting can take
 83  // three values:
 84  //
 85  // 1. Do not soft wrap.
 86  //      "soft_wrap": "none",
 87  // 2. Soft wrap lines that overflow the editor:
 88  //      "soft_wrap": "editor_width",
 89  // 3. Soft wrap lines at the preferred line length
 90  //      "soft_wrap": "preferred_line_length",
 91  "soft_wrap": "none",
 92  // The column at which to soft-wrap lines, for buffers where soft-wrap
 93  // is enabled.
 94  "preferred_line_length": 80,
 95  // Whether to indent lines using tab characters, as opposed to multiple
 96  // spaces.
 97  "hard_tabs": false,
 98  // How many columns a tab should occupy.
 99  "tab_size": 4,
100  // Control what info is collected by Zed.
101  "telemetry": {
102    // Send debug info like crash reports.
103    "diagnostics": true,
104    // Send anonymized usage data like what languages you're using Zed with.
105    "metrics": true
106  },
107  // Automatically update Zed
108  "auto_update": true,
109  // Git gutter behavior configuration.
110  "git": {
111    // Control whether the git gutter is shown. May take 2 values:
112    // 1. Show the gutter
113    //      "git_gutter": "tracked_files"
114    // 2. Hide the gutter
115    //      "git_gutter": "hide"
116    "git_gutter": "tracked_files"
117  },
118  "copilot": {
119    // The set of glob patterns for which copilot should be disabled
120    // in any matching file.
121    "disabled_globs": [
122      ".env"
123    ]
124  },
125  // Settings specific to journaling
126  "journal": {
127    // The path of the directory where journal entries are stored
128    "path": "~",
129    // What format to display the hours in
130    // May take 2 values:
131    // 1. hour12
132    // 2. hour24
133    "hour_format": "hour12"
134  },
135  // Settings specific to the terminal
136  "terminal": {
137    // What shell to use when opening a terminal. May take 3 values:
138    // 1. Use the system's default terminal configuration in /etc/passwd
139    //      "shell": "system"
140    // 2. A program:
141    //      "shell": {
142    //        "program": "sh"
143    //      }
144    // 3. A program with arguments:
145    //     "shell": {
146    //         "with_arguments": {
147    //           "program": "/bin/bash",
148    //           "arguments": ["--login"]
149    //         }
150    //     }
151    "shell": "system",
152    // What working directory to use when launching the terminal.
153    // May take 4 values:
154    // 1. Use the current file's project directory.  Will Fallback to the
155    //    first project directory strategy if unsuccessful
156    //      "working_directory": "current_project_directory"
157    // 2. Use the first project in this workspace's directory
158    //      "working_directory": "first_project_directory"
159    // 3. Always use this platform's home directory (if we can find it)
160    //     "working_directory": "always_home"
161    // 4. Always use a specific directory. This value will be shell expanded.
162    //    If this path is not a valid directory the terminal will default to
163    //    this platform's home directory  (if we can find it)
164    //      "working_directory": {
165    //        "always": {
166    //          "directory": "~/zed/projects/"
167    //        }
168    //      }
169    //
170    //
171    "working_directory": "current_project_directory",
172    // Set the cursor blinking behavior in the terminal.
173    // May take 4 values:
174    //  1. Never blink the cursor, ignoring the terminal mode
175    //         "blinking": "off",
176    //  2. Default the cursor blink to off, but allow the terminal to
177    //     set blinking
178    //         "blinking": "terminal_controlled",
179    //  3. Always blink the cursor, ignoring the terminal mode
180    //         "blinking": "on",
181    "blinking": "terminal_controlled",
182    // Set whether Alternate Scroll mode (code: ?1007) is active by default.
183    // Alternate Scroll mode converts mouse scroll events into up / down key
184    // presses when in the alternate screen (e.g. when running applications
185    // like vim or  less). The terminal can still set and unset this mode.
186    // May take 2 values:
187    //  1. Default alternate scroll mode to on
188    //         "alternate_scroll": "on",
189    //  2. Default alternate scroll mode to off
190    //         "alternate_scroll": "off",
191    "alternate_scroll": "off",
192    // Set whether the option key behaves as the meta key.
193    // May take 2 values:
194    //  1. Rely on default platform handling of option key, on macOS
195    //     this means generating certain unicode characters
196    //         "option_to_meta": false,
197    //  2. Make the option keys behave as a 'meta' key, e.g. for emacs
198    //         "option_to_meta": true,
199    "option_as_meta": false,
200    // Whether or not selecting text in the terminal will automatically
201    // copy to the system clipboard.
202    "copy_on_select": false,
203    // Any key-value pairs added to this list will be added to the terminal's
204    // enviroment. Use `:` to seperate multiple values.
205    "env": {
206      // "KEY": "value1:value2"
207    },
208    // Set the terminal's line height.
209    // May take 3 values:
210    //  1. Use a line height that's comfortable for reading, 1.618
211    //         "line_height": "comfortable"
212    //  2. Use a standard line height, 1.3. This option is useful for TUIs,
213    //      particularly if they use box characters
214    //         "line_height": "standard",
215    //  3. Use a custom line height.
216    //         "line_height": {
217    //           "custom": 2
218    //         },
219    //
220    "line_height": "comfortable"
221    // Set the terminal's font size. If this option is not included,
222    // the terminal will default to matching the buffer's font size.
223    // "font_size": "15"
224    // Set the terminal's font family. If this option is not included,
225    // the terminal will default to matching the buffer's font family.
226    // "font_family": "Zed Mono"
227  },
228  // Different settings for specific languages.
229  "languages": {
230    "Plain Text": {
231      "soft_wrap": "preferred_line_length"
232    },
233    "Elixir": {
234      "tab_size": 2
235    },
236    "Go": {
237      "tab_size": 4,
238      "hard_tabs": true
239    },
240    "Markdown": {
241      "soft_wrap": "preferred_line_length"
242    },
243    "JavaScript": {
244      "tab_size": 2
245    },
246    "TypeScript": {
247      "tab_size": 2
248    },
249    "TSX": {
250      "tab_size": 2
251    },
252    "YAML": {
253      "tab_size": 2
254    },
255    "JSON": {
256      "tab_size": 2
257    }
258  },
259  // LSP Specific settings.
260  "lsp": {
261    // Specify the LSP name as a key here.
262    // As of 8/10/22, supported LSPs are:
263    // pyright
264    // gopls
265    // rust-analyzer
266    // typescript-language-server
267    // vscode-json-languageserver
268    // "rust-analyzer": {
269    //     //These initialization options are merged into Zed's defaults
270    //     "initialization_options": {
271    //         "checkOnSave": {
272    //             "command": "clippy"
273    //         }
274    //     }
275    // }
276  }
277}