default.json

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