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