default.json

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