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