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.45`.
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 "git_diff": true,
221 "search_results": true,
222 "selected_symbol": true,
223 "diagnostics": true
224},
225```
226
227### Show Mode
228
229- Description: When to show the editor scrollbar.
230- Setting: `show`
231- Default: `auto`
232
233**Options**
234
2351. Show the scrollbar if there's important information or follow the system's configured behavior:
236
237```json
238"scrollbar": {
239 "show": "auto"
240}
241```
242
2432. Match the system's configured behavior:
244
245```json
246"scrollbar": {
247 "show": "system"
248}
249```
250
2513. Always show the scrollbar:
252
253```json
254"scrollbar": {
255 "show": "always"
256}
257```
258
2594. Never show the scrollbar:
260
261```json
262"scrollbar": {
263 "show": "never"
264}
265```
266
267### Git Diff Indicators
268
269- Description: Whether to show git diff indicators in the scrollbar.
270- Setting: `git_diff`
271- Default: `true`
272
273**Options**
274
275`boolean` values
276
277### Search Results Indicators
278
279- Description: Whether to show buffer search results in the scrollbar.
280- Setting: `search_results`
281- Default: `true`
282
283**Options**
284
285`boolean` values
286
287### Selected Symbols Indicators
288
289- Description: Whether to show selected symbol occurrences in the scrollbar.
290- Setting: `selected_symbol`
291- Default: `true`
292
293**Options**
294
295`boolean` values
296
297### Diagnostics
298
299- Description: Whether to show diagnostic indicators in the scrollbar.
300- Setting: `diagnostics`
301- Default: `true`
302
303**Options**
304
305`boolean` values
306
307## Editor Toolbar
308
309- Description: Whether or not to show various elements in the editor toolbar.
310- Setting: `toolbar`
311- Default:
312
313```json
314"toolbar": {
315 "breadcrumbs": true,
316 "quick_actions": true
317},
318```
319
320**Options**
321
322Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
323
324## Enable Language Server
325
326- Description: Whether or not to use language servers to provide code intelligence.
327- Setting: `enable_language_server`
328- Default: `true`
329
330**Options**
331
332`boolean` values
333
334## Ensure Final Newline On Save
335
336- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
337- Setting: `ensure_final_newline_on_save`
338- Default: `true`
339
340**Options**
341
342`boolean` values
343
344## LSP
345
346- Description: Configuration for language servers.
347- Setting: `lsp`
348- Default: `null`
349
350**Options**
351
352The following settings can be overridden for specific language servers:
353
354- `initialization_options`
355
356To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
357
358```json
359"lsp": {
360 "rust-analyzer": {
361 "initialization_options": {
362 "check": {
363 "command": "clippy" // rust-analyzer.check.command (default: "check")
364 }
365 }
366 }
367}
368```
369
370## Format On Save
371
372- Description: Whether or not to perform a buffer format before saving.
373- Setting: `format_on_save`
374- Default: `on`
375
376**Options**
377
3781. `on`, enables format on save obeying `formatter` setting:
379
380```json
381{
382 "format_on_save": "on"
383}
384```
385
3862. `off`, disables format on save:
387
388```json
389{
390 "format_on_save": "off"
391}
392```
393
394## Formatter
395
396- Description: How to perform a buffer format.
397- Setting: `formatter`
398- Default: `language_server`
399
400**Options**
401
4021. To use the current language server, use `"language_server"`:
403
404```json
405{
406 "formatter": "language_server"
407}
408```
409
4102. 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):
411
412```json
413{
414 "formatter": {
415 "external": {
416 "command": "sed",
417 "arguments": ["-e", "s/ *$//"]
418 }
419 }
420}
421```
422
4233. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
424
425```json
426{
427 "formatter": {
428 "code_actions": {
429 // Use ESLint's --fix:
430 "source.fixAll.eslint": true,
431 // Organize imports on save:
432 "source.organizeImports": true
433 }
434 }
435}
436```
437
438## Code Actions On Format
439
440- Description: The code actions to perform with the primary language server when formatting the buffer.
441- Setting: `code_actions_on_format`
442- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
443
444**Examples**
445
4461. Organize imports on format in TypeScript and TSX buffers:
447
448```json
449{
450 "languages": {
451 "TypeScript": {
452 "code_actions_on_format": {
453 "source.organizeImports": true
454 }
455 },
456 "TSX": {
457 "code_actions_on_format": {
458 "source.organizeImports": true
459 }
460 }
461 }
462}
463```
464
4652. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
466
467```json
468{
469 "languages": {
470 "JavaScript": {
471 "code_actions_on_format": {
472 "source.fixAll.eslint": true
473 }
474 }
475 }
476}
477```
478
4793. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
480
481```json
482{
483 "languages": {
484 "JavaScript": {
485 "code_actions_on_format": {
486 "source.fixAll.eslint": true
487 }
488 }
489 },
490 "lsp": {
491 "eslint": {
492 "settings": {
493 "codeActionOnSave": {
494 "rules": ["import/order"]
495 }
496 }
497 }
498 }
499}
500```
501
502## Auto close
503
504- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
505- Setting: `use_autoclose`
506- Default: `true`
507
508**Options**
509
510`boolean` values
511
512## Always Treat Brackets As Autoclosed
513
514- Description: Controls how the editor handles the autoclosed characters.
515- Setting: `always_treat_brackets_as_autoclosed`
516- Default: `false`
517
518**Options**
519
520`boolean` values
521
522**Example**
523
524If the setting is set to `true`:
525
5261. Enter in the editor: `)))`
5272. Move the cursor to the start: `^)))`
5283. Enter again: `)))`
529
530The result is still `)))` and not `))))))`, which is what it would be by default.
531
532## File Types
533
534- Setting: `file_types`
535- Description: Configure how Zed selects a language for a file based on its filename or extension.
536- Default: `{}`
537
538**Examples**
539
540To interpret all `.c` files as C++, and files called `MyLockFile` as TOML:
541
542```json
543{
544 "file_types": {
545 "C++": ["c"],
546 "TOML": ["MyLockFile"]
547 }
548}
549```
550
551## Git
552
553- Description: Configuration for git-related features.
554- Setting: `git`
555- Default:
556
557```json
558"git": {
559 "git_gutter": "tracked_files"
560},
561```
562
563### Git Gutter
564
565- Description: Whether or not to show the git gutter.
566- Setting: `git_gutter`
567- Default: `tracked_files`
568
569**Options**
570
5711. Show git gutter in tracked files
572
573```json
574{
575 "git_gutter": "tracked_files"
576}
577```
578
5792. Hide git gutter
580
581```json
582{
583 "git_gutter": "hide"
584}
585```
586
587## Hard Tabs
588
589- Description: Whether to indent lines using tab characters or multiple spaces.
590- Setting: `hard_tabs`
591- Default: `false`
592
593**Options**
594
595`boolean` values
596
597## Hover Popover Enabled
598
599- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
600- Setting: `hover_popover_enabled`
601- Default: `true`
602
603**Options**
604
605`boolean` values
606
607## Inlay hints
608
609- Description: Configuration for displaying extra text with hints in the editor.
610- Setting: `inlay_hints`
611- Default:
612
613```json
614"inlay_hints": {
615 "enabled": false,
616 "show_type_hints": true,
617 "show_parameter_hints": true,
618 "show_other_hints": true,
619 "edit_debounce_ms": 700,
620 "scroll_debounce_ms": 50
621}
622```
623
624**Options**
625
626Inlay hints querying consists of two parts: editor (client) and LSP server.
627With 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.
628At 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.
629
630The following languages have inlay hints preconfigured by Zed:
631
632- [Go](https://docs.zed.dev/languages/go)
633- [Rust](https://docs.zed.dev/languages/rust)
634- [Svelte](https://docs.zed.dev/languages/svelte)
635- [Typescript](https://docs.zed.dev/languages/typescript)
636
637Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
638
639Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
640Settings-related hint updates are not debounced.
641
642## Journal
643
644- Description: Configuration for the journal.
645- Setting: `journal`
646- Default:
647
648```json
649"journal": {
650 "path": "~",
651 "hour_format": "hour12"
652}
653```
654
655### Path
656
657- Description: The path of the directory where journal entries are stored.
658- Setting: `path`
659- Default: `~`
660
661**Options**
662
663`string` values
664
665### Hour Format
666
667- Description: The format to use for displaying hours in the journal.
668- Setting: `hour_format`
669- Default: `hour12`
670
671**Options**
672
6731. 12-hour format:
674
675```json
676{
677 "hour_format": "hour12"
678}
679```
680
6812. 24-hour format:
682
683```json
684{
685 "hour_format": "hour24"
686}
687```
688
689## Language Overrides
690
691- Description: Configuration overrides for specific languages.
692- Setting: `language_overrides`
693- Default: `null`
694
695**Options**
696
697To override settings for a language, add an entry for that languages name to the `language_overrides` value. Example:
698
699```json
700"language_overrides": {
701 "C": {
702 "format_on_save": "off",
703 "preferred_line_length": 64,
704 "soft_wrap": "preferred_line_length"
705 },
706 "JSON": {
707 "tab_size": 4
708 }
709}
710```
711
712The following settings can be overridden for each specific language:
713
714- `enable_language_server`
715- `ensure_final_newline_on_save`
716- `format_on_save`
717- `formatter`
718- `hard_tabs`
719- `preferred_line_length`
720- `remove_trailing_whitespace_on_save`
721- `show_copilot_suggestions`
722- `show_whitespaces`
723- `soft_wrap`
724- `tab_size`
725- `use_autoclose`
726- `always_treat_brackets_as_autoclosed`
727
728These values take in the same options as the root-level settings with the same name.
729
730## Preview tabs
731
732- Description:
733 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. \
734 There are several ways to convert a preview tab into a regular tab:
735
736 - Double-clicking on the file
737 - Double-clicking on the tab header
738 - Using the 'project_panel::OpenPermanent' action
739 - Editing the file
740 - Dragging the file to a different pane
741
742- Setting: `preview_tabs`
743- Default:
744
745```json
746"preview_tabs": {
747 "enabled": true,
748 "enable_preview_from_file_finder": false
749}
750```
751
752**Options**
753
754### Enable preview from file finder
755
756- Description: Determines whether to open files in preview mode when selected from the file finder.
757- Setting: `enable_preview_from_file_finder`
758- Default: `false`
759
760**Options**
761
762`boolean` values
763
764## Preferred Line Length
765
766- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
767- Setting: `preferred_line_length`
768- Default: `80`
769
770**Options**
771
772`integer` values
773
774## Projects Online By Default
775
776- Description: Whether or not to show the online projects view by default.
777- Setting: `projects_online_by_default`
778- Default: `true`
779
780**Options**
781
782`boolean` values
783
784## Remove Trailing Whitespace On Save
785
786- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
787- Setting: `remove_trailing_whitespace_on_save`
788- Default: `true`
789
790**Options**
791
792`boolean` values
793
794## Show Call Status Icon
795
796- Description: Whether or not to show the call status icon in the status bar.
797- Setting: `show_call_status_icon`
798- Default: `true`
799
800**Options**
801
802`boolean` values
803
804## Show Completions On Input
805
806- Description: Whether or not to show completions as you type.
807- Setting: `show_completions_on_input`
808- Default: `true`
809
810**Options**
811
812`boolean` values
813
814## Show Completion Documentation
815
816- Description: Whether to display inline and alongside documentation for items in the completions menu.
817- Setting: `show_completion_documentation`
818- Default: `true`
819
820**Options**
821
822`boolean` values
823
824## Completion Documentation Debounce Delay
825
826- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
827- Setting: `completion_documentation_secondary_query_debounce`
828- Default: `300` ms
829
830**Options**
831
832`integer` values
833
834## Show Copilot Suggestions
835
836- Description: Whether or not to show Copilot suggestions as you type or wait for a `copilot::Toggle`.
837- Setting: `show_copilot_suggestions`
838- Default: `true`
839
840**Options**
841
842`boolean` values
843
844## Show Whitespaces
845
846- Description: Whether or not to show render whitespace characters in the editor.
847- Setting: `show_whitespaces`
848- Default: `selection`
849
850**Options**
851
8521. `all`
8532. `selection`
8543. `none`
855
856## Soft Wrap
857
858- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
859- Setting: `soft_wrap`
860- Default: `none`
861
862**Options**
863
8641. `editor_width`
8652. `preferred_line_length`
8663. `none`
867
868## Tab Size
869
870- Description: The number of spaces to use for each tab character.
871- Setting: `tab_size`
872- Default: `4`
873
874**Options**
875
876`integer` values
877
878## Telemetry
879
880- Description: Control what info is collected by Zed.
881- Setting: `telemetry`
882- Default:
883
884```json
885"telemetry": {
886 "diagnostics": true,
887 "metrics": true
888},
889```
890
891**Options**
892
893### Diagnostics
894
895- Description: Setting for sending debug-related data, such as crash reports.
896- Setting: `diagnostics`
897- Default: `true`
898
899**Options**
900
901`boolean` values
902
903### Metrics
904
905- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
906- Setting: `metrics`
907- Default: `true`
908
909**Options**
910
911`boolean` values
912
913## Terminal
914
915- Description: Configuration for the terminal.
916- Setting: `terminal`
917- Default:
918
919```json
920"terminal": {
921 "alternate_scroll": "off",
922 "blinking": "terminal_controlled",
923 "copy_on_select": false,
924 "env": {},
925 "font_family": null,
926 "font_features": null,
927 "font_size": null,
928 "option_as_meta": false,
929 "button": false
930 "shell": {},
931 "toolbar": {
932 "title": true
933 },
934 "working_directory": "current_project_directory"
935}
936```
937
938### Alternate Scroll
939
940- 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.
941- Setting: `alternate_scroll`
942- Default: `off`
943
944**Options**
945
9461. Default alternate scroll mode to on
947
948```json
949{
950 "alternate_scroll": "on"
951}
952```
953
9542. Default alternate scroll mode to off
955
956```json
957{
958 "alternate_scroll": "off"
959}
960```
961
962### Blinking
963
964- Description: Set the cursor blinking behavior in the terminal
965- Setting: `blinking`
966- Default: `terminal_controlled`
967
968**Options**
969
9701. Never blink the cursor, ignore the terminal mode
971
972```json
973{
974 "blinking": "off"
975}
976```
977
9782. Default the cursor blink to off, but allow the terminal to turn blinking on
979
980```json
981{
982 "blinking": "terminal_controlled"
983}
984```
985
9863. Always blink the cursor, ignore the terminal mode
987
988```json
989"blinking": "on",
990```
991
992### Copy On Select
993
994- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
995- Setting: `copy_on_select`
996- Default: `false`
997
998**Options**
999
1000`boolean` values
1001
1002### Env
1003
1004- 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
1005- Setting: `env`
1006- Default: `{}`
1007
1008**Example**
1009
1010```json
1011"env": {
1012 "ZED": "1",
1013 "KEY": "value1:value2"
1014}
1015```
1016
1017### Font Size
1018
1019- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1020- Setting: `font_size`
1021- Default: `null`
1022
1023**Options**
1024
1025`integer` values
1026
1027### Font Family
1028
1029- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1030- Setting: `font_family`
1031- Default: `null`
1032
1033**Options**
1034
1035The name of any font family installed on the user's system
1036
1037### Font Features
1038
1039- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1040- Setting: `font_features`
1041- Default: `null`
1042
1043**Options**
1044
1045See Buffer Font Features
1046
1047### Option As Meta
1048
1049- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1050- Setting: `option_as_meta`
1051- Default: `true`
1052
1053**Options**
1054
1055`boolean` values
1056
1057### Shell
1058
1059- Description: What shell to use when launching the terminal.
1060- Setting: `shell`
1061- Default: `system`
1062
1063**Options**
1064
10651. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1066
1067```json
1068{
1069 "shell": "system"
1070}
1071```
1072
10732. A program to launch:
1074
1075```json
1076"shell": {
1077 "program": "sh"
1078}
1079```
1080
10813. A program with arguments:
1082
1083```json
1084"shell": {
1085 "with_arguments": {
1086 "program": "/bin/bash",
1087 "args": ["--login"]
1088 }
1089}
1090```
1091
1092## Terminal Toolbar
1093
1094- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1095- Setting: `toolbar`
1096- Default:
1097
1098```json
1099"toolbar": {
1100 "title": true,
1101},
1102```
1103
1104**Options**
1105
1106At 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.
1107
1108### Terminal Button
1109
1110- Description: Control to show or hide the terminal button in the status bar
1111- Setting: `button`
1112- Default: `true`
1113
1114**Options**
1115
1116`boolean` values
1117
1118### Working Directory
1119
1120- Description: What working directory to use when launching the terminal.
1121- Setting: `working_directory`
1122- Default: `"current_project_directory"`
1123
1124**Options**
1125
11261. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1127
1128```json
1129{
1130 "working_directory": "current_project_directory"
1131}
1132```
1133
11342. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1135
1136```json
1137{
1138 "working_directory": "first_project_directory"
1139}
1140```
1141
11423. Always use this platform's home directory (if we can find it)
1143
1144```json
1145{
1146 "working_directory": "always_home"
1147}
1148```
1149
11504. 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.
1151
1152```json
1153"working_directory": {
1154 "always": {
1155 "directory": "~/zed/projects/"
1156 }
1157}
1158```
1159
1160## Theme
1161
1162- 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.
1163- Setting: `theme`
1164- Default: `One Dark`
1165
1166### Theme Object
1167
1168- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1169- Setting: `theme`
1170- Default:
1171
1172```json
1173"theme": {
1174 "mode": "dark",
1175 "dark": "One Dark",
1176 "light": "One Light"
1177},
1178```
1179
1180### Mode
1181
1182- Description: Specify theme mode.
1183- Setting: `mode`
1184- Default: `dark`
1185
1186**Options**
1187
11881. Set the theme to dark mode
1189
1190```json
1191{
1192 "mode": "dark"
1193}
1194```
1195
11962. Set the theme to light mode
1197
1198```json
1199{
1200 "mode": "light"
1201}
1202```
1203
12043. Set the theme to system mode
1205
1206```json
1207{
1208 "mode": "system"
1209}
1210```
1211
1212### Dark
1213
1214- Description: The name of the dark Zed theme to use for the UI.
1215- Setting: `dark`
1216- Default: `One Dark`
1217
1218**Options**
1219
1220Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1221
1222### Light
1223
1224- Description: The name of the light Zed theme to use for the UI.
1225- Setting: `light`
1226- Default: `One Light`
1227
1228**Options**
1229
1230Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1231
1232## Vim
1233
1234- Description: Whether or not to enable vim mode (work in progress).
1235- Setting: `vim_mode`
1236- Default: `false`
1237
1238## Project Panel
1239
1240- Description: Customise project panel
1241- Setting: `project_panel`
1242- Default:
1243
1244```json
1245"project_panel": {
1246 "dock": "left",
1247 "git_status": true,
1248 "default_width": "N/A - width in pixels"
1249},
1250```
1251
1252### Dock
1253
1254- Description: Control the position of the dock
1255- Setting: `dock`
1256- Default: `left`
1257
1258**Options**
1259
12601. Default dock position to left
1261
1262```json
1263{
1264 "dock": "left"
1265}
1266```
1267
12682. Default dock position to right
1269
1270```json
1271{
1272 "dock": "right"
1273}
1274```
1275
1276### Git Status
1277
1278- Description: Indicates newly created and updated files
1279- Setting: `git_status`
1280- Default: `true`
1281
12821. Default enable git status
1283
1284```json
1285{
1286 "git_status": true
1287}
1288```
1289
12902. Default disable git status
1291
1292```json
1293{
1294 "git_status": false
1295}
1296```
1297
1298### Default Width
1299
1300- Description: Customise default width taken by project panel
1301- Setting: `default_width`
1302- Default: N/A width in pixels (eg: 420)
1303
1304**Options**
1305
1306`boolean` values
1307
1308## An example configuration:
1309
1310```json
1311// ~/.config/zed/settings.json
1312{
1313 "theme": "cave-light",
1314 "tab_size": 2,
1315 "preferred_line_length": 80,
1316 "soft_wrap": "none",
1317
1318 "buffer_font_size": 18,
1319 "buffer_font_family": "Zed Mono",
1320
1321 "autosave": "on_focus_change",
1322 "format_on_save": "off",
1323 "vim_mode": false,
1324 "projects_online_by_default": true,
1325 "terminal": {
1326 "font_family": "FiraCode Nerd Font Mono",
1327 "blinking": "off"
1328 },
1329 "language_overrides": {
1330 "C": {
1331 "format_on_save": "language_server",
1332 "preferred_line_length": 64,
1333 "soft_wrap": "preferred_line_length"
1334 }
1335 }
1336}
1337```