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    // How to auto-format modified buffers when saving them. This
 36    // setting can take three values:
 37    //
 38    // 1. Don't format code
 39    //     "format_on_save": "off"
 40    // 2. Format code using the current language server:
 41    //     "format_on_save": "language_server"
 42    // 3. Format code using an external command:
 43    //     "format_on_save": {
 44    //       "external": {
 45    //         "command": "prettier",
 46    //         "arguments": ["--stdin-filepath", "{buffer_path}"]
 47    //       }
 48    //     }
 49    "format_on_save": "language_server",
 50    // How to soft-wrap long lines of text. This setting can take
 51    // three values:
 52    //
 53    // 1. Do not soft wrap.
 54    //      "soft_wrap": "none",
 55    // 2. Soft wrap lines that overflow the editor:
 56    //      "soft_wrap": "editor_width",
 57    // 3. Soft wrap lines at the preferred line length
 58    //      "soft_wrap": "preferred_line_length",
 59    "soft_wrap": "none",
 60    // The column at which to soft-wrap lines, for buffers where soft-wrap
 61    // is enabled.
 62    "preferred_line_length": 80,
 63    // Whether to indent lines using tab characters, as opposed to multiple
 64    // spaces.
 65    "hard_tabs": false,
 66    // How many columns a tab should occupy.
 67    "tab_size": 4,
 68    // Settings specific to the terminal
 69    "terminal": {
 70        // What shell to use when opening a terminal. May take 3 values: 
 71        // 1. Use the system's default terminal configuration (e.g. $TERM).
 72        //      "shell": "system"
 73        // 2. A program:
 74        //      "shell": {
 75        //        "program": "sh"
 76        //      }
 77        // 3. A program with arguments:
 78        //     "shell": {
 79        //         "with_arguments": {
 80        //           "program": "/bin/bash",
 81        //           "arguments": ["--login"]
 82        //         }
 83        //     }
 84        "shell": "system",
 85        // What working directory to use when launching the terminal.
 86        // May take 4 values:
 87        // 1. Use the current file's project directory.  Will Fallback to the 
 88        //    first project directory strategy if unsuccessful
 89        //      "working_directory": "current_project_directory"
 90        // 2. Use the first project in this workspace's directory
 91        //      "working_directory": "first_project_directory"
 92        // 3. Always use this platform's home directory (if we can find it)
 93        //     "working_directory": "always_home"
 94        // 4. Always use a specific directory. This value will be shell expanded.
 95        //    If this path is not a valid directory the terminal will default to
 96        //    this platform's home directory  (if we can find it)
 97        //      "working_directory": { 
 98        //        "always": {
 99        //          "directory": "~/zed/projects/"
100        //        }
101        //      }
102        //
103        //
104        "working_directory": "current_project_directory",
105        // Set the cursor blinking behavior in the terminal.
106        // May take 4 values:
107        //  1. Never blink the cursor, ignoring the terminal mode
108        //         "blinking": "off",
109        //  2. Default the cursor blink to off, but allow the terminal to 
110        //     set blinking
111        //         "blinking": "terminal_controlled",
112        //  3. Always blink the cursor, ignoring the terminal mode
113        //         "blinking": "on",
114        "blinking": "terminal_controlled",
115        // Set whether Alternate Scroll mode (code: ?1007) is active by default.
116        // Alternate Scroll mode converts mouse scroll events into up / down key
117        // presses when in the alternate screen (e.g. when running applications 
118        // like vim or  less). The terminal can still set and unset this mode.
119        // May take 2 values:
120        //  1. Default alternate scroll mode to on
121        //         "alternate_scroll": "on",
122        //  2. Default alternate scroll mode to off
123        //         "alternate_scroll": "off",
124        "alternate_scroll": "off",
125        // Any key-value pairs added to this list will be added to the terminal's
126        // enviroment. Use `:` to seperate multiple values.
127        "env": {
128            // "KEY": "value1:value2"
129        }
130        // Set the terminal's font size. If this option is not included,
131        // the terminal will default to matching the buffer's font size.
132        // "font_size": "15"
133        // Set the terminal's font family. If this option is not included,
134        // the terminal will default to matching the buffer's font family.
135        // "font_family": "Zed Mono"
136    },
137    // Different settings for specific languages.
138    "languages": {
139        "Plain Text": {
140            "soft_wrap": "preferred_line_length"
141        },
142        "C": {
143            "tab_size": 2
144        },
145        "C++": {
146            "tab_size": 2
147        },
148        "Elixir": {
149            "tab_size": 2
150        },
151        "Go": {
152            "tab_size": 4,
153            "hard_tabs": true
154        },
155        "Markdown": {
156            "soft_wrap": "preferred_line_length"
157        },
158        "Rust": {
159            "tab_size": 4
160        },
161        "JavaScript": {
162            "tab_size": 2
163        },
164        "TypeScript": {
165            "tab_size": 2
166        },
167        "TSX": {
168            "tab_size": 2
169        }
170    },
171    // LSP Specific settings.
172    "lsp": {
173        // Specify the LSP name as a key here.
174        // As of 8/10/22, supported LSPs are:
175        // pyright
176        // gopls
177        // rust-analyzer
178        // typescript-language-server
179        // vscode-json-languageserver
180        // "rust_analyzer": {
181        //     //These initialization options are merged into Zed's defaults
182        //     "initialization_options": {
183        //         "checkOnSave": {
184        //             "command": "clippy"
185        //         }
186        //     }
187        // }
188    }
189}