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