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