1# Configuring Zed
2
3## Folder-specific settings
4
5Folder-specific settings are used to override Zed's global settings for files within a specific directory in the project panel. To get started, create a `.zed` subdirectory and add a `settings.json` within it. It should be noted that folder-specific settings don't need to live only a project's root, but can be defined at multiple levels in the project hierarchy. In setups like this, Zed will find the configuration nearest to the file you are working in and apply those settings to it. In most cases, this level of flexibility won't be needed and a single configuration for all files in a project is all that is required; the `Zed > Settings > Open Local Settings` menu action is built for this case. Running this action will look for a `.zed/settings.json` file at the root of the first top-level directory in your project panel. If it does not exist, it will create it.
6
7The following global settings can be overridden with a folder-specific configuration:
8
9- `copilot`
10- `enable_language_server`
11- `ensure_final_newline_on_save`
12- `format_on_save`
13- `formatter`
14- `hard_tabs`
15- `language_overrides`
16- `preferred_line_length`
17- `remove_trailing_whitespace_on_save`
18- `soft_wrap`
19- `tab_size`
20- `show_copilot_suggestions`
21- `show_whitespaces`
22
23_See the Global settings section for details about these settings_
24
25## Global settings
26
27To get started with editing Zed's global settings, open `~/.config/zed/settings.json` via `⌘` + `,`, the command palette (`zed: open settings`), or the `Zed > Settings > Open Settings` application menu item.
28
29Here are all the currently available settings.
30
31## Active Pane Magnification
32
33- Description: Scale by which to zoom the active pane. When set to `1.0`, the active pane has the same size as others, but when set to a larger value, the active pane takes up more space.
34- Setting: `active_pane_magnification`
35- Default: `1.0`
36
37**Options**
38
39`float` values
40
41## Autosave
42
43- Description: When to automatically save edited buffers.
44- Setting: `autosave`
45- Default: `off`
46
47**Options**
48
491. To disable autosave, set it to `off`
50
51```json
52{
53 "autosave": "off"
54}
55```
56
572. To autosave when focus changes, use `on_focus_change`:
58
59```json
60{
61 "autosave": "on_focus_change"
62}
63```
64
653. To autosave when the active window changes, use `on_window_change`:
66
67```json
68{
69 "autosave": "on_window_change"
70}
71```
72
734. To autosave after an inactivity period, use `after_delay`:
74
75```json
76{
77 "autosave": {
78 "after_delay": {
79 "milliseconds": 1000
80 }
81 }
82}
83```
84
85## Auto Update
86
87- Description: Whether or not to automatically check for updates.
88- Setting: `auto_update`
89- Default: `true`
90
91**Options**
92
93`boolean` values
94
95## Buffer Font Family
96
97- Description: The name of a font to use for rendering text in the editor.
98- Setting: `buffer_font_family`
99- Default: `Zed Mono`
100
101**Options**
102
103The name of any font family installed on the user's system
104
105## Buffer Font Features
106
107- Description: The OpenType features to enable for text in the editor.
108- Setting: `buffer_font_features`
109- Default: `null`
110
111**Options**
112
113Zed supports a subset of OpenType features that can be enabled or disabled for a given buffer or terminal font. The following [OpenType features](https://en.wikipedia.org/wiki/List_of_typographic_features) can be enabled or disabled too: `calt`, `case`, `cpsp`, `frac`, `liga`, `onum`, `ordn`, `pnum`, `ss01`, `ss02`, `ss03`, `ss04`, `ss05`, `ss06`, `ss07`, `ss08`, `ss09`, `ss10`, `ss11`, `ss12`, `ss13`, `ss14`, `ss15`, `ss16`, `ss17`, `ss18`, `ss19`, `ss20`, `subs`, `sups`, `swsh`, `titl`, `tnum`, `zero`.
114
115For example, to disable ligatures for a given font you can add the following to your settings:
116
117```json
118{
119 "buffer_font_features": {
120 "calt": false
121 }
122}
123```
124
125## Buffer Font Size
126
127- Description: The default font size for text in the editor.
128- Setting: `buffer_font_size`
129- Default: `15`
130
131**Options**
132
133`integer` values
134
135## Confirm Quit
136
137- Description: Whether or not to prompt the user to confirm before closing the application.
138- Setting: `confirm_quit`
139- Default: `false`
140
141**Options**
142
143`boolean` values
144
145## Centered Layout
146
147- Description: Configuration for the centered layout mode.
148- Setting: `centered_layout`
149- Default:
150
151```json
152"centered_layout": {
153 "left_padding": 0.2,
154 "right_padding": 0.2,
155}
156```
157
158**Options**
159
160The `left_padding` and `right_padding` options define the relative width of the
161left and right padding of the central pane from the workspace when the centered layout mode is activated. Valid values range is from `0` to `0.4`.
162
163## Copilot
164
165- Description: Copilot-specific settings.
166- Setting: `copilot`
167- Default:
168
169```json
170"copilot": {
171 "disabled_globs": [
172 ".env"
173 ]
174}
175```
176
177**Options**
178
179### Disabled Globs
180
181- Description: The set of glob patterns for which Copilot should be disabled in any matching file.
182- Setting: `disabled_globs`
183- Default: [".env"]
184
185**Options**
186
187List of `string` values
188
189## Cursor Blink
190
191- Description: Whether or not the cursor blinks.
192- Setting: `cursor_blink`
193- Default: `true`
194
195**Options**
196
197`boolean` values
198
199## Default Dock Anchor
200
201- Description: The default anchor for new docks.
202- Setting: `default_dock_anchor`
203- Default: `bottom`
204
205**Options**
206
2071. Position the dock attached to the bottom of the workspace: `bottom`
2082. Position the dock to the right of the workspace like a side panel: `right`
2093. Position the dock full screen over the entire workspace: `expanded`
210
211## Editor Scrollbar
212
213- Description: Whether or not to show the editor scrollbar and various elements in it.
214- Setting: `scrollbar`
215- Default:
216
217```json
218"scrollbar": {
219 "show": "auto",
220 "cursors": true,
221 "git_diff": true,
222 "search_results": true,
223 "selected_symbol": true,
224 "diagnostics": true
225},
226```
227
228### Show Mode
229
230- Description: When to show the editor scrollbar.
231- Setting: `show`
232- Default: `auto`
233
234**Options**
235
2361. Show the scrollbar if there's important information or follow the system's configured behavior:
237
238```json
239"scrollbar": {
240 "show": "auto"
241}
242```
243
2442. Match the system's configured behavior:
245
246```json
247"scrollbar": {
248 "show": "system"
249}
250```
251
2523. Always show the scrollbar:
253
254```json
255"scrollbar": {
256 "show": "always"
257}
258```
259
2604. Never show the scrollbar:
261
262```json
263"scrollbar": {
264 "show": "never"
265}
266```
267
268### Cursor Indicators
269
270- Description: Whether to show cursor positions in the scrollbar.
271- Setting: `cursors`
272- Default: `true`
273
274**Options**
275
276`boolean` values
277
278### Git Diff Indicators
279
280- Description: Whether to show git diff indicators in the scrollbar.
281- Setting: `git_diff`
282- Default: `true`
283
284**Options**
285
286`boolean` values
287
288### Search Results Indicators
289
290- Description: Whether to show buffer search results in the scrollbar.
291- Setting: `search_results`
292- Default: `true`
293
294**Options**
295
296`boolean` values
297
298### Selected Symbols Indicators
299
300- Description: Whether to show selected symbol occurrences in the scrollbar.
301- Setting: `selected_symbol`
302- Default: `true`
303
304**Options**
305
306`boolean` values
307
308### Diagnostics
309
310- Description: Whether to show diagnostic indicators in the scrollbar.
311- Setting: `diagnostics`
312- Default: `true`
313
314**Options**
315
316`boolean` values
317
318## Editor Toolbar
319
320- Description: Whether or not to show various elements in the editor toolbar.
321- Setting: `toolbar`
322- Default:
323
324```json
325"toolbar": {
326 "breadcrumbs": true,
327 "quick_actions": true
328},
329```
330
331**Options**
332
333Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
334
335## Enable Language Server
336
337- Description: Whether or not to use language servers to provide code intelligence.
338- Setting: `enable_language_server`
339- Default: `true`
340
341**Options**
342
343`boolean` values
344
345## Ensure Final Newline On Save
346
347- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
348- Setting: `ensure_final_newline_on_save`
349- Default: `true`
350
351**Options**
352
353`boolean` values
354
355## LSP
356
357- Description: Configuration for language servers.
358- Setting: `lsp`
359- Default: `null`
360
361**Options**
362
363The following settings can be overridden for specific language servers:
364
365- `initialization_options`
366
367To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
368
369```json
370"lsp": {
371 "rust-analyzer": {
372 "initialization_options": {
373 "check": {
374 "command": "clippy" // rust-analyzer.check.command (default: "check")
375 }
376 }
377 }
378}
379```
380
381## Format On Save
382
383- Description: Whether or not to perform a buffer format before saving.
384- Setting: `format_on_save`
385- Default: `on`
386
387**Options**
388
3891. `on`, enables format on save obeying `formatter` setting:
390
391```json
392{
393 "format_on_save": "on"
394}
395```
396
3972. `off`, disables format on save:
398
399```json
400{
401 "format_on_save": "off"
402}
403```
404
405## Formatter
406
407- Description: How to perform a buffer format.
408- Setting: `formatter`
409- Default: `language_server`
410
411**Options**
412
4131. To use the current language server, use `"language_server"`:
414
415```json
416{
417 "formatter": "language_server"
418}
419```
420
4212. Or to use an external command, use `"external"`. Specify the name of the formatting program to run, and an array of arguments to pass to the program. The buffer's text will be passed to the program on stdin, and the formatted output should be written to stdout. For example, the following command would strip trailing spaces using [`sed(1)`](https://linux.die.net/man/1/sed):
422
423```json
424{
425 "formatter": {
426 "external": {
427 "command": "sed",
428 "arguments": ["-e", "s/ *$//"]
429 }
430 }
431}
432```
433
4343. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
435
436```json
437{
438 "formatter": {
439 "code_actions": {
440 // Use ESLint's --fix:
441 "source.fixAll.eslint": true,
442 // Organize imports on save:
443 "source.organizeImports": true
444 }
445 }
446}
447```
448
449## Code Actions On Format
450
451- Description: The code actions to perform with the primary language server when formatting the buffer.
452- Setting: `code_actions_on_format`
453- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
454
455**Examples**
456
4571. Organize imports on format in TypeScript and TSX buffers:
458
459```json
460{
461 "languages": {
462 "TypeScript": {
463 "code_actions_on_format": {
464 "source.organizeImports": true
465 }
466 },
467 "TSX": {
468 "code_actions_on_format": {
469 "source.organizeImports": true
470 }
471 }
472 }
473}
474```
475
4762. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
477
478```json
479{
480 "languages": {
481 "JavaScript": {
482 "code_actions_on_format": {
483 "source.fixAll.eslint": true
484 }
485 }
486 }
487}
488```
489
4903. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
491
492```json
493{
494 "languages": {
495 "JavaScript": {
496 "code_actions_on_format": {
497 "source.fixAll.eslint": true
498 }
499 }
500 },
501 "lsp": {
502 "eslint": {
503 "settings": {
504 "codeActionOnSave": {
505 "rules": ["import/order"]
506 }
507 }
508 }
509 }
510}
511```
512
513## Auto close
514
515- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
516- Setting: `use_autoclose`
517- Default: `true`
518
519**Options**
520
521`boolean` values
522
523## Always Treat Brackets As Autoclosed
524
525- Description: Controls how the editor handles the autoclosed characters.
526- Setting: `always_treat_brackets_as_autoclosed`
527- Default: `false`
528
529**Options**
530
531`boolean` values
532
533**Example**
534
535If the setting is set to `true`:
536
5371. Enter in the editor: `)))`
5382. Move the cursor to the start: `^)))`
5393. Enter again: `)))`
540
541The result is still `)))` and not `))))))`, which is what it would be by default.
542
543## File Types
544
545- Setting: `file_types`
546- Description: Configure how Zed selects a language for a file based on its filename or extension.
547- Default: `{}`
548
549**Examples**
550
551To interpret all `.c` files as C++, and files called `MyLockFile` as TOML:
552
553```json
554{
555 "file_types": {
556 "C++": ["c"],
557 "TOML": ["MyLockFile"]
558 }
559}
560```
561
562## Git
563
564- Description: Configuration for git-related features.
565- Setting: `git`
566- Default:
567
568```json
569{
570 "git": {
571 "git_gutter": "tracked_files",
572 "inline_blame": {
573 "enabled": true
574 }
575 }
576}
577```
578
579### Git Gutter
580
581- Description: Whether or not to show the git gutter.
582- Setting: `git_gutter`
583- Default: `tracked_files`
584
585**Options**
586
5871. Show git gutter in tracked files
588
589```json
590{
591 "git": {
592 "git_gutter": "tracked_files"
593 }
594}
595```
596
5972. Hide git gutter
598
599```json
600{
601 "git": {
602 "git_gutter": "hide"
603 }
604}
605```
606
607### Inline Git Blame
608
609- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
610- Setting: `inline_blame`
611- Default:
612
613```json
614{
615 "git": {
616 "inline_blame": {
617 "enabled": true
618 }
619 }
620}
621```
622
623**Options**
624
6251. Disable inline git blame:
626
627```json
628{
629 "git": {
630 "inline_blame": {
631 "enabled": false
632 }
633 }
634}
635```
636
6372. Only show inline git blame after a delay (that starts after cursor stops moving):
638
639```json
640{
641 "git": {
642 "inline_blame": {
643 "enabled": false,
644 "delay_ms": 500
645 }
646 }
647}
648```
649
650## Hard Tabs
651
652- Description: Whether to indent lines using tab characters or multiple spaces.
653- Setting: `hard_tabs`
654- Default: `false`
655
656**Options**
657
658`boolean` values
659
660## Hover Popover Enabled
661
662- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
663- Setting: `hover_popover_enabled`
664- Default: `true`
665
666**Options**
667
668`boolean` values
669
670## Inlay hints
671
672- Description: Configuration for displaying extra text with hints in the editor.
673- Setting: `inlay_hints`
674- Default:
675
676```json
677"inlay_hints": {
678 "enabled": false,
679 "show_type_hints": true,
680 "show_parameter_hints": true,
681 "show_other_hints": true,
682 "edit_debounce_ms": 700,
683 "scroll_debounce_ms": 50
684}
685```
686
687**Options**
688
689Inlay hints querying consists of two parts: editor (client) and LSP server.
690With the inlay settings above are changed to enable the hints, editor will start to query certain types of hints and react on LSP hint refresh request from the server.
691At this point, the server may or may not return hints depending on its implementation, further configuration might be needed, refer to the corresponding LSP server documentation.
692
693The following languages have inlay hints preconfigured by Zed:
694
695- [Go](https://docs.zed.dev/languages/go)
696- [Rust](https://docs.zed.dev/languages/rust)
697- [Svelte](https://docs.zed.dev/languages/svelte)
698- [Typescript](https://docs.zed.dev/languages/typescript)
699
700Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
701
702Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
703Settings-related hint updates are not debounced.
704
705## Journal
706
707- Description: Configuration for the journal.
708- Setting: `journal`
709- Default:
710
711```json
712"journal": {
713 "path": "~",
714 "hour_format": "hour12"
715}
716```
717
718### Path
719
720- Description: The path of the directory where journal entries are stored.
721- Setting: `path`
722- Default: `~`
723
724**Options**
725
726`string` values
727
728### Hour Format
729
730- Description: The format to use for displaying hours in the journal.
731- Setting: `hour_format`
732- Default: `hour12`
733
734**Options**
735
7361. 12-hour format:
737
738```json
739{
740 "hour_format": "hour12"
741}
742```
743
7442. 24-hour format:
745
746```json
747{
748 "hour_format": "hour24"
749}
750```
751
752## Language Overrides
753
754- Description: Configuration overrides for specific languages.
755- Setting: `language_overrides`
756- Default: `null`
757
758**Options**
759
760To override settings for a language, add an entry for that languages name to the `language_overrides` value. Example:
761
762```json
763"language_overrides": {
764 "C": {
765 "format_on_save": "off",
766 "preferred_line_length": 64,
767 "soft_wrap": "preferred_line_length"
768 },
769 "JSON": {
770 "tab_size": 4
771 }
772}
773```
774
775The following settings can be overridden for each specific language:
776
777- `enable_language_server`
778- `ensure_final_newline_on_save`
779- `format_on_save`
780- `formatter`
781- `hard_tabs`
782- `preferred_line_length`
783- `remove_trailing_whitespace_on_save`
784- `show_copilot_suggestions`
785- `show_whitespaces`
786- `soft_wrap`
787- `tab_size`
788- `use_autoclose`
789- `always_treat_brackets_as_autoclosed`
790
791These values take in the same options as the root-level settings with the same name.
792
793## Preview tabs
794
795- Description:
796 (requires Zed `0.132.x`) \
797 Preview tabs allow you to open files in preview mode, where they close automatically when you switch to another file unless you explicitly pin them. This is useful for quickly viewing files without cluttering your workspace. Preview tabs display their file names in italics. \
798 There are several ways to convert a preview tab into a regular tab:
799
800 - Double-clicking on the file
801 - Double-clicking on the tab header
802 - Using the `project_panel::OpenPermanent` action
803 - Editing the file
804 - Dragging the file to a different pane
805
806- Setting: `preview_tabs`
807- Default:
808
809```json
810"preview_tabs": {
811 "enabled": true,
812 "enable_preview_from_file_finder": false,
813 "enable_preview_from_code_navigation": false,
814}
815```
816
817### Enable preview from file finder
818
819- Description: Determines whether to open files in preview mode when selected from the file finder.
820- Setting: `enable_preview_from_file_finder`
821- Default: `false`
822
823**Options**
824
825`boolean` values
826
827### Enable preview from code navigation
828
829- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab (requires Zed `0.134.x`).
830- Setting: `enable_preview_from_code_navigation`
831- Default: `false`
832
833**Options**
834
835`boolean` values
836
837## Preferred Line Length
838
839- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
840- Setting: `preferred_line_length`
841- Default: `80`
842
843**Options**
844
845`integer` values
846
847## Projects Online By Default
848
849- Description: Whether or not to show the online projects view by default.
850- Setting: `projects_online_by_default`
851- Default: `true`
852
853**Options**
854
855`boolean` values
856
857## Remove Trailing Whitespace On Save
858
859- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
860- Setting: `remove_trailing_whitespace_on_save`
861- Default: `true`
862
863**Options**
864
865`boolean` values
866
867## Show Call Status Icon
868
869- Description: Whether or not to show the call status icon in the status bar.
870- Setting: `show_call_status_icon`
871- Default: `true`
872
873**Options**
874
875`boolean` values
876
877## Show Completions On Input
878
879- Description: Whether or not to show completions as you type.
880- Setting: `show_completions_on_input`
881- Default: `true`
882
883**Options**
884
885`boolean` values
886
887## Show Completion Documentation
888
889- Description: Whether to display inline and alongside documentation for items in the completions menu.
890- Setting: `show_completion_documentation`
891- Default: `true`
892
893**Options**
894
895`boolean` values
896
897## Completion Documentation Debounce Delay
898
899- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
900- Setting: `completion_documentation_secondary_query_debounce`
901- Default: `300` ms
902
903**Options**
904
905`integer` values
906
907## Show Copilot Suggestions
908
909- Description: Whether or not to show Copilot suggestions as you type or wait for a `copilot::Toggle`.
910- Setting: `show_copilot_suggestions`
911- Default: `true`
912
913**Options**
914
915`boolean` values
916
917## Show Whitespaces
918
919- Description: Whether or not to show render whitespace characters in the editor.
920- Setting: `show_whitespaces`
921- Default: `selection`
922
923**Options**
924
9251. `all`
9262. `selection`
9273. `none`
928
929## Soft Wrap
930
931- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
932- Setting: `soft_wrap`
933- Default: `none`
934
935**Options**
936
9371. `editor_width`
9382. `preferred_line_length`
9393. `none`
940
941## Tab Size
942
943- Description: The number of spaces to use for each tab character.
944- Setting: `tab_size`
945- Default: `4`
946
947**Options**
948
949`integer` values
950
951## Telemetry
952
953- Description: Control what info is collected by Zed.
954- Setting: `telemetry`
955- Default:
956
957```json
958"telemetry": {
959 "diagnostics": true,
960 "metrics": true
961},
962```
963
964**Options**
965
966### Diagnostics
967
968- Description: Setting for sending debug-related data, such as crash reports.
969- Setting: `diagnostics`
970- Default: `true`
971
972**Options**
973
974`boolean` values
975
976### Metrics
977
978- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
979- Setting: `metrics`
980- Default: `true`
981
982**Options**
983
984`boolean` values
985
986## Terminal
987
988- Description: Configuration for the terminal.
989- Setting: `terminal`
990- Default:
991
992```json
993"terminal": {
994 "alternate_scroll": "off",
995 "blinking": "terminal_controlled",
996 "copy_on_select": false,
997 "env": {},
998 "font_family": null,
999 "font_features": null,
1000 "font_size": null,
1001 "option_as_meta": false,
1002 "button": false,
1003 "shell": {},
1004 "toolbar": {
1005 "title": true
1006 },
1007 "working_directory": "current_project_directory"
1008}
1009```
1010
1011### Alternate Scroll
1012
1013- Description: Set whether Alternate Scroll mode (DECSET code: `?1007`) is active by default. Alternate Scroll mode converts mouse scroll events into up / down key presses when in the alternate screen (e.g. when running applications like vim or less). The terminal can still set and unset this mode with ANSI escape codes.
1014- Setting: `alternate_scroll`
1015- Default: `off`
1016
1017**Options**
1018
10191. Default alternate scroll mode to on
1020
1021```json
1022{
1023 "alternate_scroll": "on"
1024}
1025```
1026
10272. Default alternate scroll mode to off
1028
1029```json
1030{
1031 "alternate_scroll": "off"
1032}
1033```
1034
1035### Blinking
1036
1037- Description: Set the cursor blinking behavior in the terminal
1038- Setting: `blinking`
1039- Default: `terminal_controlled`
1040
1041**Options**
1042
10431. Never blink the cursor, ignore the terminal mode
1044
1045```json
1046{
1047 "blinking": "off"
1048}
1049```
1050
10512. Default the cursor blink to off, but allow the terminal to turn blinking on
1052
1053```json
1054{
1055 "blinking": "terminal_controlled"
1056}
1057```
1058
10593. Always blink the cursor, ignore the terminal mode
1060
1061```json
1062"blinking": "on",
1063```
1064
1065### Copy On Select
1066
1067- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1068- Setting: `copy_on_select`
1069- Default: `false`
1070
1071**Options**
1072
1073`boolean` values
1074
1075### Env
1076
1077- Description: Any key-value pairs added to this object will be added to the terminal's environment. Keys must be unique, use `:` to separate multiple values in a single variable
1078- Setting: `env`
1079- Default: `{}`
1080
1081**Example**
1082
1083```json
1084"env": {
1085 "ZED": "1",
1086 "KEY": "value1:value2"
1087}
1088```
1089
1090### Font Size
1091
1092- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1093- Setting: `font_size`
1094- Default: `null`
1095
1096**Options**
1097
1098`integer` values
1099
1100### Font Family
1101
1102- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1103- Setting: `font_family`
1104- Default: `null`
1105
1106**Options**
1107
1108The name of any font family installed on the user's system
1109
1110### Font Features
1111
1112- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1113- Setting: `font_features`
1114- Default: `null`
1115
1116**Options**
1117
1118See Buffer Font Features
1119
1120### Option As Meta
1121
1122- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1123- Setting: `option_as_meta`
1124- Default: `true`
1125
1126**Options**
1127
1128`boolean` values
1129
1130### Shell
1131
1132- Description: What shell to use when launching the terminal.
1133- Setting: `shell`
1134- Default: `system`
1135
1136**Options**
1137
11381. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1139
1140```json
1141{
1142 "shell": "system"
1143}
1144```
1145
11462. A program to launch:
1147
1148```json
1149"shell": {
1150 "program": "sh"
1151}
1152```
1153
11543. A program with arguments:
1155
1156```json
1157"shell": {
1158 "with_arguments": {
1159 "program": "/bin/bash",
1160 "args": ["--login"]
1161 }
1162}
1163```
1164
1165## Terminal Toolbar
1166
1167- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1168- Setting: `toolbar`
1169- Default:
1170
1171```json
1172"toolbar": {
1173 "title": true,
1174},
1175```
1176
1177**Options**
1178
1179At the moment, only the `title` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`. If the title is hidden, the terminal toolbar is not displayed.
1180
1181### Terminal Button
1182
1183- Description: Control to show or hide the terminal button in the status bar
1184- Setting: `button`
1185- Default: `true`
1186
1187**Options**
1188
1189`boolean` values
1190
1191### Working Directory
1192
1193- Description: What working directory to use when launching the terminal.
1194- Setting: `working_directory`
1195- Default: `"current_project_directory"`
1196
1197**Options**
1198
11991. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1200
1201```json
1202{
1203 "working_directory": "current_project_directory"
1204}
1205```
1206
12072. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1208
1209```json
1210{
1211 "working_directory": "first_project_directory"
1212}
1213```
1214
12153. Always use this platform's home directory (if we can find it)
1216
1217```json
1218{
1219 "working_directory": "always_home"
1220}
1221```
1222
12234. Always use a specific directory. This value will be shell expanded. If this path is not a valid directory the terminal will default to this platform's home directory.
1224
1225```json
1226"working_directory": {
1227 "always": {
1228 "directory": "~/zed/projects/"
1229 }
1230}
1231```
1232
1233## Theme
1234
1235- Description: The theme setting can be specified in two forms - either as the name of a theme or as an object containing the `mode`, `dark`, and `light` themes for the Zed UI.
1236- Setting: `theme`
1237- Default: `One Dark`
1238
1239### Theme Object
1240
1241- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1242- Setting: `theme`
1243- Default:
1244
1245```json
1246"theme": {
1247 "mode": "dark",
1248 "dark": "One Dark",
1249 "light": "One Light"
1250},
1251```
1252
1253### Mode
1254
1255- Description: Specify theme mode.
1256- Setting: `mode`
1257- Default: `dark`
1258
1259**Options**
1260
12611. Set the theme to dark mode
1262
1263```json
1264{
1265 "mode": "dark"
1266}
1267```
1268
12692. Set the theme to light mode
1270
1271```json
1272{
1273 "mode": "light"
1274}
1275```
1276
12773. Set the theme to system mode
1278
1279```json
1280{
1281 "mode": "system"
1282}
1283```
1284
1285### Dark
1286
1287- Description: The name of the dark Zed theme to use for the UI.
1288- Setting: `dark`
1289- Default: `One Dark`
1290
1291**Options**
1292
1293Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1294
1295### Light
1296
1297- Description: The name of the light Zed theme to use for the UI.
1298- Setting: `light`
1299- Default: `One Light`
1300
1301**Options**
1302
1303Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1304
1305## Vim
1306
1307- Description: Whether or not to enable vim mode (work in progress).
1308- Setting: `vim_mode`
1309- Default: `false`
1310
1311## Project Panel
1312
1313- Description: Customise project panel
1314- Setting: `project_panel`
1315- Default:
1316
1317```json
1318"project_panel": {
1319 "button": true,
1320 "dock": "left",
1321 "git_status": true,
1322 "default_width": "N/A - width in pixels"
1323},
1324```
1325
1326### Dock
1327
1328- Description: Control the position of the dock
1329- Setting: `dock`
1330- Default: `left`
1331
1332**Options**
1333
13341. Default dock position to left
1335
1336```json
1337{
1338 "dock": "left"
1339}
1340```
1341
13422. Default dock position to right
1343
1344```json
1345{
1346 "dock": "right"
1347}
1348```
1349
1350### Git Status
1351
1352- Description: Indicates newly created and updated files
1353- Setting: `git_status`
1354- Default: `true`
1355
13561. Default enable git status
1357
1358```json
1359{
1360 "git_status": true
1361}
1362```
1363
13642. Default disable git status
1365
1366```json
1367{
1368 "git_status": false
1369}
1370```
1371
1372### Default Width
1373
1374- Description: Customise default width taken by project panel
1375- Setting: `default_width`
1376- Default: N/A width in pixels (eg: 420)
1377
1378**Options**
1379
1380`boolean` values
1381
1382## Calls
1383
1384- Description: Customise behaviour when participating in a call
1385- Setting: `calls`
1386- Default:
1387
1388```json
1389"calls": {
1390 // Join calls with the microphone live by default
1391 "mute_on_join": false,
1392 // Share your project when you are the first to join a channel
1393 "share_on_join": true
1394},
1395```
1396
1397## An example configuration:
1398
1399```json
1400// ~/.config/zed/settings.json
1401{
1402 "theme": "cave-light",
1403 "tab_size": 2,
1404 "preferred_line_length": 80,
1405 "soft_wrap": "none",
1406
1407 "buffer_font_size": 18,
1408 "buffer_font_family": "Zed Mono",
1409
1410 "autosave": "on_focus_change",
1411 "format_on_save": "off",
1412 "vim_mode": false,
1413 "projects_online_by_default": true,
1414 "terminal": {
1415 "font_family": "FiraCode Nerd Font Mono",
1416 "blinking": "off"
1417 },
1418 "language_overrides": {
1419 "C": {
1420 "format_on_save": "language_server",
1421 "preferred_line_length": 64,
1422 "soft_wrap": "preferred_line_length"
1423 }
1424 }
1425}
1426```