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