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