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