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