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}
814```
815
816### Enable preview from file finder
817
818- Description: Determines whether to open files in preview mode when selected from the file finder.
819- Setting: `enable_preview_from_file_finder`
820- Default: `false`
821
822**Options**
823
824`boolean` values
825
826## Preferred Line Length
827
828- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
829- Setting: `preferred_line_length`
830- Default: `80`
831
832**Options**
833
834`integer` values
835
836## Projects Online By Default
837
838- Description: Whether or not to show the online projects view by default.
839- Setting: `projects_online_by_default`
840- Default: `true`
841
842**Options**
843
844`boolean` values
845
846## Remove Trailing Whitespace On Save
847
848- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
849- Setting: `remove_trailing_whitespace_on_save`
850- Default: `true`
851
852**Options**
853
854`boolean` values
855
856## Show Call Status Icon
857
858- Description: Whether or not to show the call status icon in the status bar.
859- Setting: `show_call_status_icon`
860- Default: `true`
861
862**Options**
863
864`boolean` values
865
866## Show Completions On Input
867
868- Description: Whether or not to show completions as you type.
869- Setting: `show_completions_on_input`
870- Default: `true`
871
872**Options**
873
874`boolean` values
875
876## Show Completion Documentation
877
878- Description: Whether to display inline and alongside documentation for items in the completions menu.
879- Setting: `show_completion_documentation`
880- Default: `true`
881
882**Options**
883
884`boolean` values
885
886## Completion Documentation Debounce Delay
887
888- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
889- Setting: `completion_documentation_secondary_query_debounce`
890- Default: `300` ms
891
892**Options**
893
894`integer` values
895
896## Show Copilot Suggestions
897
898- Description: Whether or not to show Copilot suggestions as you type or wait for a `copilot::Toggle`.
899- Setting: `show_copilot_suggestions`
900- Default: `true`
901
902**Options**
903
904`boolean` values
905
906## Show Whitespaces
907
908- Description: Whether or not to show render whitespace characters in the editor.
909- Setting: `show_whitespaces`
910- Default: `selection`
911
912**Options**
913
9141. `all`
9152. `selection`
9163. `none`
917
918## Soft Wrap
919
920- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
921- Setting: `soft_wrap`
922- Default: `none`
923
924**Options**
925
9261. `editor_width`
9272. `preferred_line_length`
9283. `none`
929
930## Tab Size
931
932- Description: The number of spaces to use for each tab character.
933- Setting: `tab_size`
934- Default: `4`
935
936**Options**
937
938`integer` values
939
940## Telemetry
941
942- Description: Control what info is collected by Zed.
943- Setting: `telemetry`
944- Default:
945
946```json
947"telemetry": {
948 "diagnostics": true,
949 "metrics": true
950},
951```
952
953**Options**
954
955### Diagnostics
956
957- Description: Setting for sending debug-related data, such as crash reports.
958- Setting: `diagnostics`
959- Default: `true`
960
961**Options**
962
963`boolean` values
964
965### Metrics
966
967- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
968- Setting: `metrics`
969- Default: `true`
970
971**Options**
972
973`boolean` values
974
975## Terminal
976
977- Description: Configuration for the terminal.
978- Setting: `terminal`
979- Default:
980
981```json
982"terminal": {
983 "alternate_scroll": "off",
984 "blinking": "terminal_controlled",
985 "copy_on_select": false,
986 "env": {},
987 "font_family": null,
988 "font_features": null,
989 "font_size": null,
990 "option_as_meta": false,
991 "button": false,
992 "shell": {},
993 "toolbar": {
994 "title": true
995 },
996 "working_directory": "current_project_directory"
997}
998```
999
1000### Alternate Scroll
1001
1002- 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.
1003- Setting: `alternate_scroll`
1004- Default: `off`
1005
1006**Options**
1007
10081. Default alternate scroll mode to on
1009
1010```json
1011{
1012 "alternate_scroll": "on"
1013}
1014```
1015
10162. Default alternate scroll mode to off
1017
1018```json
1019{
1020 "alternate_scroll": "off"
1021}
1022```
1023
1024### Blinking
1025
1026- Description: Set the cursor blinking behavior in the terminal
1027- Setting: `blinking`
1028- Default: `terminal_controlled`
1029
1030**Options**
1031
10321. Never blink the cursor, ignore the terminal mode
1033
1034```json
1035{
1036 "blinking": "off"
1037}
1038```
1039
10402. Default the cursor blink to off, but allow the terminal to turn blinking on
1041
1042```json
1043{
1044 "blinking": "terminal_controlled"
1045}
1046```
1047
10483. Always blink the cursor, ignore the terminal mode
1049
1050```json
1051"blinking": "on",
1052```
1053
1054### Copy On Select
1055
1056- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1057- Setting: `copy_on_select`
1058- Default: `false`
1059
1060**Options**
1061
1062`boolean` values
1063
1064### Env
1065
1066- 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
1067- Setting: `env`
1068- Default: `{}`
1069
1070**Example**
1071
1072```json
1073"env": {
1074 "ZED": "1",
1075 "KEY": "value1:value2"
1076}
1077```
1078
1079### Font Size
1080
1081- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1082- Setting: `font_size`
1083- Default: `null`
1084
1085**Options**
1086
1087`integer` values
1088
1089### Font Family
1090
1091- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1092- Setting: `font_family`
1093- Default: `null`
1094
1095**Options**
1096
1097The name of any font family installed on the user's system
1098
1099### Font Features
1100
1101- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1102- Setting: `font_features`
1103- Default: `null`
1104
1105**Options**
1106
1107See Buffer Font Features
1108
1109### Option As Meta
1110
1111- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1112- Setting: `option_as_meta`
1113- Default: `true`
1114
1115**Options**
1116
1117`boolean` values
1118
1119### Shell
1120
1121- Description: What shell to use when launching the terminal.
1122- Setting: `shell`
1123- Default: `system`
1124
1125**Options**
1126
11271. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1128
1129```json
1130{
1131 "shell": "system"
1132}
1133```
1134
11352. A program to launch:
1136
1137```json
1138"shell": {
1139 "program": "sh"
1140}
1141```
1142
11433. A program with arguments:
1144
1145```json
1146"shell": {
1147 "with_arguments": {
1148 "program": "/bin/bash",
1149 "args": ["--login"]
1150 }
1151}
1152```
1153
1154## Terminal Toolbar
1155
1156- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1157- Setting: `toolbar`
1158- Default:
1159
1160```json
1161"toolbar": {
1162 "title": true,
1163},
1164```
1165
1166**Options**
1167
1168At 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.
1169
1170### Terminal Button
1171
1172- Description: Control to show or hide the terminal button in the status bar
1173- Setting: `button`
1174- Default: `true`
1175
1176**Options**
1177
1178`boolean` values
1179
1180### Working Directory
1181
1182- Description: What working directory to use when launching the terminal.
1183- Setting: `working_directory`
1184- Default: `"current_project_directory"`
1185
1186**Options**
1187
11881. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1189
1190```json
1191{
1192 "working_directory": "current_project_directory"
1193}
1194```
1195
11962. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1197
1198```json
1199{
1200 "working_directory": "first_project_directory"
1201}
1202```
1203
12043. Always use this platform's home directory (if we can find it)
1205
1206```json
1207{
1208 "working_directory": "always_home"
1209}
1210```
1211
12124. 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.
1213
1214```json
1215"working_directory": {
1216 "always": {
1217 "directory": "~/zed/projects/"
1218 }
1219}
1220```
1221
1222## Theme
1223
1224- 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.
1225- Setting: `theme`
1226- Default: `One Dark`
1227
1228### Theme Object
1229
1230- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1231- Setting: `theme`
1232- Default:
1233
1234```json
1235"theme": {
1236 "mode": "dark",
1237 "dark": "One Dark",
1238 "light": "One Light"
1239},
1240```
1241
1242### Mode
1243
1244- Description: Specify theme mode.
1245- Setting: `mode`
1246- Default: `dark`
1247
1248**Options**
1249
12501. Set the theme to dark mode
1251
1252```json
1253{
1254 "mode": "dark"
1255}
1256```
1257
12582. Set the theme to light mode
1259
1260```json
1261{
1262 "mode": "light"
1263}
1264```
1265
12663. Set the theme to system mode
1267
1268```json
1269{
1270 "mode": "system"
1271}
1272```
1273
1274### Dark
1275
1276- Description: The name of the dark Zed theme to use for the UI.
1277- Setting: `dark`
1278- Default: `One Dark`
1279
1280**Options**
1281
1282Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1283
1284### Light
1285
1286- Description: The name of the light Zed theme to use for the UI.
1287- Setting: `light`
1288- Default: `One Light`
1289
1290**Options**
1291
1292Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1293
1294## Vim
1295
1296- Description: Whether or not to enable vim mode (work in progress).
1297- Setting: `vim_mode`
1298- Default: `false`
1299
1300## Project Panel
1301
1302- Description: Customise project panel
1303- Setting: `project_panel`
1304- Default:
1305
1306```json
1307"project_panel": {
1308 "button": true,
1309 "dock": "left",
1310 "git_status": true,
1311 "default_width": "N/A - width in pixels"
1312},
1313```
1314
1315### Dock
1316
1317- Description: Control the position of the dock
1318- Setting: `dock`
1319- Default: `left`
1320
1321**Options**
1322
13231. Default dock position to left
1324
1325```json
1326{
1327 "dock": "left"
1328}
1329```
1330
13312. Default dock position to right
1332
1333```json
1334{
1335 "dock": "right"
1336}
1337```
1338
1339### Git Status
1340
1341- Description: Indicates newly created and updated files
1342- Setting: `git_status`
1343- Default: `true`
1344
13451. Default enable git status
1346
1347```json
1348{
1349 "git_status": true
1350}
1351```
1352
13532. Default disable git status
1354
1355```json
1356{
1357 "git_status": false
1358}
1359```
1360
1361### Default Width
1362
1363- Description: Customise default width taken by project panel
1364- Setting: `default_width`
1365- Default: N/A width in pixels (eg: 420)
1366
1367**Options**
1368
1369`boolean` values
1370
1371## Calls
1372
1373- Description: Customise behaviour when participating in a call
1374- Setting: `calls`
1375- Default:
1376
1377```json
1378"calls": {
1379 // Join calls with the microphone live by default
1380 "mute_on_join": false,
1381 // Share your project when you are the first to join a channel
1382 "share_on_join": true
1383},
1384```
1385
1386## An example configuration:
1387
1388```json
1389// ~/.config/zed/settings.json
1390{
1391 "theme": "cave-light",
1392 "tab_size": 2,
1393 "preferred_line_length": 80,
1394 "soft_wrap": "none",
1395
1396 "buffer_font_size": 18,
1397 "buffer_font_family": "Zed Mono",
1398
1399 "autosave": "on_focus_change",
1400 "format_on_save": "off",
1401 "vim_mode": false,
1402 "projects_online_by_default": true,
1403 "terminal": {
1404 "font_family": "FiraCode Nerd Font Mono",
1405 "blinking": "off"
1406 },
1407 "language_overrides": {
1408 "C": {
1409 "format_on_save": "language_server",
1410 "preferred_line_length": 64,
1411 "soft_wrap": "preferred_line_length"
1412 }
1413 }
1414}
1415```