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