1{
2 // The name of the Zed theme to use for the UI
3 "theme": "One Dark",
4 // The name of a base set of key bindings to use.
5 // This setting can take four values, each named after another
6 // text editor:
7 //
8 // 1. "VSCode"
9 // 2. "JetBrains"
10 // 3. "SublimeText"
11 // 4. "Atom"
12 "base_keymap": "VSCode",
13 // Features that can be globally enabled or disabled
14 "features": {
15 // Show Copilot icon in status bar
16 "copilot": true
17 },
18 // The name of a font to use for rendering text in the editor
19 "buffer_font_family": "Zed Mono",
20 // The OpenType features to enable for text in the editor.
21 "buffer_font_features": {
22 // Disable ligatures:
23 // "calt": false
24 },
25 // The default font size for text in the editor
26 "buffer_font_size": 15,
27 // The factor to grow the active pane by. Defaults to 1.0
28 // which gives the same size as all other panes.
29 "active_pane_magnification": 1.0,
30 // Whether to enable vim modes and key bindings
31 "vim_mode": false,
32 // Whether to show the informational hover box when moving the mouse
33 // over symbols in the editor.
34 "hover_popover_enabled": true,
35 // Whether to confirm before quitting Zed.
36 "confirm_quit": false,
37 // Whether the cursor blinks in the editor.
38 "cursor_blink": true,
39 // Whether to pop the completions menu while typing in an editor without
40 // explicitly requesting it.
41 "show_completions_on_input": true,
42 // Whether to use additional LSP queries to format (and amend) the code after
43 // every "trigger" symbol input, defined by LSP server capabilities.
44 "use_on_type_format": true,
45 // Controls whether copilot provides suggestion immediately
46 // or waits for a `copilot::Toggle`
47 "show_copilot_suggestions": true,
48 // Whether to show tabs and spaces in the editor.
49 // This setting can take two values:
50 //
51 // 1. Draw tabs and spaces only for the selected text (default):
52 // "selection"
53 // 2. Do not draw any tabs or spaces:
54 // "none"
55 // 3. Draw all invisible symbols:
56 // "all"
57 "show_whitespaces": "selection",
58 // Scrollbar related settings
59 "scrollbar": {
60 // When to show the scrollbar in the editor.
61 // This setting can take four values:
62 //
63 // 1. Show the scrollbar if there's important information or
64 // follow the system's configured behavior (default):
65 // "auto"
66 // 2. Match the system's configured behavior:
67 // "system"
68 // 3. Always show the scrollbar:
69 // "always"
70 // 4. Never show the scrollbar:
71 // "never"
72 "show": "auto",
73 // Whether to show git diff indicators in the scrollbar.
74 "git_diff": true
75 },
76 "project_panel": {
77 // Whether to show the git status in the project panel.
78 "git_status": true,
79 // Where to dock project panel. Can be 'left' or 'right'.
80 "dock": "left",
81 // Default width of the project panel.
82 "default_width": 240
83 },
84 // Whether the screen sharing icon is shown in the os status bar.
85 "show_call_status_icon": true,
86 // Whether to use language servers to provide code intelligence.
87 "enable_language_server": true,
88 // When to automatically save edited buffers. This setting can
89 // take four values.
90 //
91 // 1. Never automatically save:
92 // "autosave": "off",
93 // 2. Save when changing focus away from the Zed window:
94 // "autosave": "on_window_change",
95 // 3. Save when changing focus away from a specific buffer:
96 // "autosave": "on_focus_change",
97 // 4. Save when idle for a certain amount of time:
98 // "autosave": { "after_delay": {"milliseconds": 500} },
99 "autosave": "off",
100 // Whether or not to remove any trailing whitespace from lines of a buffer
101 // before saving it.
102 "remove_trailing_whitespace_on_save": true,
103 // Whether or not to ensure there's a single newline at the end of a buffer
104 // when saving it.
105 "ensure_final_newline_on_save": true,
106 // Whether or not to perform a buffer format before saving
107 "format_on_save": "on",
108 // How to perform a buffer format. This setting can take two values:
109 //
110 // 1. Format code using the current language server:
111 // "format_on_save": "language_server"
112 // 2. Format code using an external command:
113 // "format_on_save": {
114 // "external": {
115 // "command": "prettier",
116 // "arguments": ["--stdin-filepath", "{buffer_path}"]
117 // }
118 // }
119 "formatter": "language_server",
120 // How to soft-wrap long lines of text. This setting can take
121 // three values:
122 //
123 // 1. Do not soft wrap.
124 // "soft_wrap": "none",
125 // 2. Soft wrap lines that overflow the editor:
126 // "soft_wrap": "editor_width",
127 // 3. Soft wrap lines at the preferred line length
128 // "soft_wrap": "preferred_line_length",
129 "soft_wrap": "none",
130 // The column at which to soft-wrap lines, for buffers where soft-wrap
131 // is enabled.
132 "preferred_line_length": 80,
133 // Whether to indent lines using tab characters, as opposed to multiple
134 // spaces.
135 "hard_tabs": false,
136 // How many columns a tab should occupy.
137 "tab_size": 4,
138 // Control what info is collected by Zed.
139 "telemetry": {
140 // Send debug info like crash reports.
141 "diagnostics": true,
142 // Send anonymized usage data like what languages you're using Zed with.
143 "metrics": true
144 },
145 // Automatically update Zed
146 "auto_update": true,
147 // Git gutter behavior configuration.
148 "git": {
149 // Control whether the git gutter is shown. May take 2 values:
150 // 1. Show the gutter
151 // "git_gutter": "tracked_files"
152 // 2. Hide the gutter
153 // "git_gutter": "hide"
154 "git_gutter": "tracked_files"
155 },
156 "copilot": {
157 // The set of glob patterns for which copilot should be disabled
158 // in any matching file.
159 "disabled_globs": [
160 ".env"
161 ]
162 },
163 // Settings specific to journaling
164 "journal": {
165 // The path of the directory where journal entries are stored
166 "path": "~",
167 // What format to display the hours in
168 // May take 2 values:
169 // 1. hour12
170 // 2. hour24
171 "hour_format": "hour12"
172 },
173 // Settings specific to the terminal
174 "terminal": {
175 // What shell to use when opening a terminal. May take 3 values:
176 // 1. Use the system's default terminal configuration in /etc/passwd
177 // "shell": "system"
178 // 2. A program:
179 // "shell": {
180 // "program": "sh"
181 // }
182 // 3. A program with arguments:
183 // "shell": {
184 // "with_arguments": {
185 // "program": "/bin/bash",
186 // "arguments": ["--login"]
187 // }
188 // }
189 "shell": "system",
190 // Where to dock terminals panel. Can be 'left', 'right', 'bottom'.
191 "dock": "bottom",
192 // Default width when the terminal is docked to the left or right.
193 "default_width": 640,
194 // Default height when the terminal is docked to the bottom.
195 "default_height": 320,
196 // What working directory to use when launching the terminal.
197 // May take 4 values:
198 // 1. Use the current file's project directory. Will Fallback to the
199 // first project directory strategy if unsuccessful
200 // "working_directory": "current_project_directory"
201 // 2. Use the first project in this workspace's directory
202 // "working_directory": "first_project_directory"
203 // 3. Always use this platform's home directory (if we can find it)
204 // "working_directory": "always_home"
205 // 4. Always use a specific directory. This value will be shell expanded.
206 // If this path is not a valid directory the terminal will default to
207 // this platform's home directory (if we can find it)
208 // "working_directory": {
209 // "always": {
210 // "directory": "~/zed/projects/"
211 // }
212 // }
213 //
214 //
215 "working_directory": "current_project_directory",
216 // Set the cursor blinking behavior in the terminal.
217 // May take 4 values:
218 // 1. Never blink the cursor, ignoring the terminal mode
219 // "blinking": "off",
220 // 2. Default the cursor blink to off, but allow the terminal to
221 // set blinking
222 // "blinking": "terminal_controlled",
223 // 3. Always blink the cursor, ignoring the terminal mode
224 // "blinking": "on",
225 "blinking": "terminal_controlled",
226 // Set whether Alternate Scroll mode (code: ?1007) is active by default.
227 // Alternate Scroll mode converts mouse scroll events into up / down key
228 // presses when in the alternate screen (e.g. when running applications
229 // like vim or less). The terminal can still set and unset this mode.
230 // May take 2 values:
231 // 1. Default alternate scroll mode to on
232 // "alternate_scroll": "on",
233 // 2. Default alternate scroll mode to off
234 // "alternate_scroll": "off",
235 "alternate_scroll": "off",
236 // Set whether the option key behaves as the meta key.
237 // May take 2 values:
238 // 1. Rely on default platform handling of option key, on macOS
239 // this means generating certain unicode characters
240 // "option_to_meta": false,
241 // 2. Make the option keys behave as a 'meta' key, e.g. for emacs
242 // "option_to_meta": true,
243 "option_as_meta": false,
244 // Whether or not selecting text in the terminal will automatically
245 // copy to the system clipboard.
246 "copy_on_select": false,
247 // Any key-value pairs added to this list will be added to the terminal's
248 // environment. Use `:` to separate multiple values.
249 "env": {
250 // "KEY": "value1:value2"
251 },
252 // Set the terminal's line height.
253 // May take 3 values:
254 // 1. Use a line height that's comfortable for reading, 1.618
255 // "line_height": "comfortable"
256 // 2. Use a standard line height, 1.3. This option is useful for TUIs,
257 // particularly if they use box characters
258 // "line_height": "standard",
259 // 3. Use a custom line height.
260 // "line_height": {
261 // "custom": 2
262 // },
263 //
264 "line_height": "comfortable"
265 // Set the terminal's font size. If this option is not included,
266 // the terminal will default to matching the buffer's font size.
267 // "font_size": "15"
268 // Set the terminal's font family. If this option is not included,
269 // the terminal will default to matching the buffer's font family.
270 // "font_family": "Zed Mono"
271 },
272 // Different settings for specific languages.
273 "languages": {
274 "Plain Text": {
275 "soft_wrap": "preferred_line_length"
276 },
277 "Elixir": {
278 "tab_size": 2
279 },
280 "Go": {
281 "tab_size": 4,
282 "hard_tabs": true
283 },
284 "Markdown": {
285 "soft_wrap": "preferred_line_length"
286 },
287 "JavaScript": {
288 "tab_size": 2
289 },
290 "TypeScript": {
291 "tab_size": 2
292 },
293 "TSX": {
294 "tab_size": 2
295 },
296 "YAML": {
297 "tab_size": 2
298 },
299 "JSON": {
300 "tab_size": 2
301 }
302 },
303 // LSP Specific settings.
304 "lsp": {
305 // Specify the LSP name as a key here.
306 // As of 8/10/22, supported LSPs are:
307 // pyright
308 // gopls
309 // rust-analyzer
310 // typescript-language-server
311 // vscode-json-languageserver
312 // "rust-analyzer": {
313 // //These initialization options are merged into Zed's defaults
314 // "initialization_options": {
315 // "checkOnSave": {
316 // "command": "clippy"
317 // }
318 // }
319 // }
320 }
321}