default.json

  1{
  2    // The name of the Zed theme to use for the UI
  3    "theme": "One Dark",
  4    // Features that can be globally enabled or disabled
  5    "features": {
  6        // Show Copilot icon in status bar
  7        "copilot": true
  8    },
  9    // The name of a font to use for rendering text in the editor
 10    "buffer_font_family": "Zed Mono",
 11    // The OpenType features to enable for text in the editor.
 12    "buffer_font_features": {
 13        // Disable ligatures:
 14        // "calt": false
 15    },
 16    // The default font size for text in the editor
 17    "buffer_font_size": 15,
 18    // The factor to grow the active pane by. Defaults to 1.0
 19    // which gives the same size as all other panes.
 20    "active_pane_magnification": 1.0,
 21    // Whether to enable vim modes and key bindings
 22    "vim_mode": false,
 23    // Whether to show the informational hover box when moving the mouse
 24    // over symbols in the editor.
 25    "hover_popover_enabled": true,
 26    // Whether to confirm before quitting Zed.
 27    "confirm_quit": false,
 28    // Whether the cursor blinks in the editor.
 29    "cursor_blink": true,
 30    // Whether to pop the completions menu while typing in an editor without
 31    // explicitly requesting it.
 32    "show_completions_on_input": true,
 33    // Controls whether copilot provides suggestion immediately
 34    // or waits for a `copilot::Toggle`
 35    "show_copilot_suggestions": true,
 36    // Whether the screen sharing icon is shown in the os status bar.
 37    "show_call_status_icon": true,
 38    // Whether to use language servers to provide code intelligence.
 39    "enable_language_server": true,
 40    // When to automatically save edited buffers. This setting can
 41    // take four values.
 42    //
 43    // 1. Never automatically save:
 44    //     "autosave": "off",
 45    // 2. Save when changing focus away from the Zed window:
 46    //     "autosave": "on_window_change",
 47    // 3. Save when changing focus away from a specific buffer:
 48    //     "autosave": "on_focus_change",
 49    // 4. Save when idle for a certain amount of time:
 50    //     "autosave": { "after_delay": {"milliseconds": 500} },
 51    "autosave": "off",
 52    // Where to place the dock by default. This setting can take three
 53    // values:
 54    //
 55    // 1. Position the dock attached to the bottom of the workspace
 56    //     "default_dock_anchor": "bottom"
 57    // 2. Position the dock to the right of the workspace like a side panel
 58    //     "default_dock_anchor": "right"
 59    // 3. Position the dock full screen over the entire workspace"
 60    //     "default_dock_anchor": "expanded"
 61    "default_dock_anchor": "bottom",
 62    // Whether or not to remove any trailing whitespace from lines of a buffer
 63    // before saving it.
 64    "remove_trailing_whitespace_on_save": true,
 65    // Whether or not to ensure there's a single newline at the end of a buffer
 66    // when saving it.
 67    "ensure_final_newline_on_save": true,
 68    // Whether or not to perform a buffer format before saving
 69    "format_on_save": "on",
 70    // How to perform a buffer format. This setting can take two values:
 71    //
 72    // 1. Format code using the current language server:
 73    //     "format_on_save": "language_server"
 74    // 2. Format code using an external command:
 75    //     "format_on_save": {
 76    //       "external": {
 77    //         "command": "prettier",
 78    //         "arguments": ["--stdin-filepath", "{buffer_path}"]
 79    //       }
 80    //     }
 81    "formatter": "language_server",
 82    // How to soft-wrap long lines of text. This setting can take
 83    // three values:
 84    //
 85    // 1. Do not soft wrap.
 86    //      "soft_wrap": "none",
 87    // 2. Soft wrap lines that overflow the editor:
 88    //      "soft_wrap": "editor_width",
 89    // 3. Soft wrap lines at the preferred line length
 90    //      "soft_wrap": "preferred_line_length",
 91    "soft_wrap": "none",
 92    // The column at which to soft-wrap lines, for buffers where soft-wrap
 93    // is enabled.
 94    "preferred_line_length": 80,
 95    // Whether to indent lines using tab characters, as opposed to multiple
 96    // spaces.
 97    "hard_tabs": false,
 98    // How many columns a tab should occupy.
 99    "tab_size": 4,
100    // Control what info is collected by Zed.
101    "telemetry": {
102        // Send debug info like crash reports.
103        "diagnostics": true,
104        // Send anonymized usage data like what languages you're using Zed with.
105        "metrics": true
106    },
107    // Automatically update Zed
108    "auto_update": true,
109    // Git gutter behavior configuration.
110    "git": {
111        // Control whether the git gutter is shown. May take 2 values:
112        // 1. Show the gutter
113        //      "git_gutter": "tracked_files"
114        // 2. Hide the gutter
115        //      "git_gutter": "hide"
116        "git_gutter": "tracked_files"
117    },
118    // Settings specific to journaling
119    "journal": {
120        // The path of the directory where journal entries are stored
121        "path": "~",
122        // What format to display the hours in
123        // May take 2 values:
124        // 1. hour12
125        // 2. hour24
126        "hour_format": "hour12"
127    },
128    // Settings specific to the terminal
129    "terminal": {
130        // What shell to use when opening a terminal. May take 3 values:
131        // 1. Use the system's default terminal configuration in /etc/passwd
132        //      "shell": "system"
133        // 2. A program:
134        //      "shell": {
135        //        "program": "sh"
136        //      }
137        // 3. A program with arguments:
138        //     "shell": {
139        //         "with_arguments": {
140        //           "program": "/bin/bash",
141        //           "arguments": ["--login"]
142        //         }
143        //     }
144        "shell": "system",
145        // What working directory to use when launching the terminal.
146        // May take 4 values:
147        // 1. Use the current file's project directory.  Will Fallback to the
148        //    first project directory strategy if unsuccessful
149        //      "working_directory": "current_project_directory"
150        // 2. Use the first project in this workspace's directory
151        //      "working_directory": "first_project_directory"
152        // 3. Always use this platform's home directory (if we can find it)
153        //     "working_directory": "always_home"
154        // 4. Always use a specific directory. This value will be shell expanded.
155        //    If this path is not a valid directory the terminal will default to
156        //    this platform's home directory  (if we can find it)
157        //      "working_directory": {
158        //        "always": {
159        //          "directory": "~/zed/projects/"
160        //        }
161        //      }
162        //
163        //
164        "working_directory": "current_project_directory",
165        // Set the cursor blinking behavior in the terminal.
166        // May take 4 values:
167        //  1. Never blink the cursor, ignoring the terminal mode
168        //         "blinking": "off",
169        //  2. Default the cursor blink to off, but allow the terminal to
170        //     set blinking
171        //         "blinking": "terminal_controlled",
172        //  3. Always blink the cursor, ignoring the terminal mode
173        //         "blinking": "on",
174        "blinking": "terminal_controlled",
175        // Set whether Alternate Scroll mode (code: ?1007) is active by default.
176        // Alternate Scroll mode converts mouse scroll events into up / down key
177        // presses when in the alternate screen (e.g. when running applications
178        // like vim or  less). The terminal can still set and unset this mode.
179        // May take 2 values:
180        //  1. Default alternate scroll mode to on
181        //         "alternate_scroll": "on",
182        //  2. Default alternate scroll mode to off
183        //         "alternate_scroll": "off",
184        "alternate_scroll": "off",
185        // Set whether the option key behaves as the meta key.
186        // May take 2 values:
187        //  1. Rely on default platform handling of option key, on macOS
188        //     this means generating certain unicode characters
189        //         "option_to_meta": false,
190        //  2. Make the option keys behave as a 'meta' key, e.g. for emacs
191        //         "option_to_meta": true,
192        "option_as_meta": false,
193        // Whether or not selecting text in the terminal will automatically
194        // copy to the system clipboard.
195        "copy_on_select": false,
196        // Any key-value pairs added to this list will be added to the terminal's
197        // enviroment. Use `:` to seperate multiple values.
198        "env": {
199            // "KEY": "value1:value2"
200        }
201        // Set the terminal's font size. If this option is not included,
202        // the terminal will default to matching the buffer's font size.
203        // "font_size": "15"
204        // Set the terminal's font family. If this option is not included,
205        // the terminal will default to matching the buffer's font family.
206        // "font_family": "Zed Mono"
207    },
208    // Different settings for specific languages.
209    "languages": {
210        "Plain Text": {
211            "soft_wrap": "preferred_line_length"
212        },
213        "Elixir": {
214            "tab_size": 2
215        },
216        "Go": {
217            "tab_size": 4,
218            "hard_tabs": true
219        },
220        "Markdown": {
221            "soft_wrap": "preferred_line_length"
222        },
223        "JavaScript": {
224            "tab_size": 2
225        },
226        "TypeScript": {
227            "tab_size": 2
228        },
229        "TSX": {
230            "tab_size": 2
231        },
232        "YAML": {
233            "tab_size": 2
234        }
235    },
236    // LSP Specific settings.
237    "lsp": {
238        // Specify the LSP name as a key here.
239        // As of 8/10/22, supported LSPs are:
240        // pyright
241        // gopls
242        // rust-analyzer
243        // typescript-language-server
244        // vscode-json-languageserver
245        // "rust-analyzer": {
246        //     //These initialization options are merged into Zed's defaults
247        //     "initialization_options": {
248        //         "checkOnSave": {
249        //             "command": "clippy"
250        //         }
251        //     }
252        // }
253    }
254}