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