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 "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{
559 "git": {
560 "git_gutter": "tracked_files",
561 "inline_blame": {
562 "enabled": true
563 }
564 }
565}
566```
567
568### Git Gutter
569
570- Description: Whether or not to show the git gutter.
571- Setting: `git_gutter`
572- Default: `tracked_files`
573
574**Options**
575
5761. Show git gutter in tracked files
577
578```json
579{
580 "git": {
581 "git_gutter": "tracked_files"
582 }
583}
584```
585
5862. Hide git gutter
587
588```json
589{
590 "git": {
591 "git_gutter": "hide"
592 }
593}
594```
595
596### Inline Git Blame
597
598- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
599- Setting: `inline_blame`
600- Default:
601
602```json
603{
604 "git": {
605 "inline_blame": {
606 "enabled": true
607 }
608 }
609}
610```
611
612**Options**
613
6141. Disable inline git blame:
615
616```json
617{
618 "git": {
619 "inline_blame": {
620 "enabled": false
621 }
622 }
623}
624```
625
6262. Only show inline git blame after a delay (that starts after cursor stops moving):
627
628```json
629{
630 "git": {
631 "inline_blame": {
632 "enabled": false,
633 "delay_ms": 500
634 }
635 }
636}
637```
638
639## Hard Tabs
640
641- Description: Whether to indent lines using tab characters or multiple spaces.
642- Setting: `hard_tabs`
643- Default: `false`
644
645**Options**
646
647`boolean` values
648
649## Hover Popover Enabled
650
651- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
652- Setting: `hover_popover_enabled`
653- Default: `true`
654
655**Options**
656
657`boolean` values
658
659## Inlay hints
660
661- Description: Configuration for displaying extra text with hints in the editor.
662- Setting: `inlay_hints`
663- Default:
664
665```json
666"inlay_hints": {
667 "enabled": false,
668 "show_type_hints": true,
669 "show_parameter_hints": true,
670 "show_other_hints": true,
671 "edit_debounce_ms": 700,
672 "scroll_debounce_ms": 50
673}
674```
675
676**Options**
677
678Inlay hints querying consists of two parts: editor (client) and LSP server.
679With 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.
680At 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.
681
682The following languages have inlay hints preconfigured by Zed:
683
684- [Go](https://docs.zed.dev/languages/go)
685- [Rust](https://docs.zed.dev/languages/rust)
686- [Svelte](https://docs.zed.dev/languages/svelte)
687- [Typescript](https://docs.zed.dev/languages/typescript)
688
689Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
690
691Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
692Settings-related hint updates are not debounced.
693
694## Journal
695
696- Description: Configuration for the journal.
697- Setting: `journal`
698- Default:
699
700```json
701"journal": {
702 "path": "~",
703 "hour_format": "hour12"
704}
705```
706
707### Path
708
709- Description: The path of the directory where journal entries are stored.
710- Setting: `path`
711- Default: `~`
712
713**Options**
714
715`string` values
716
717### Hour Format
718
719- Description: The format to use for displaying hours in the journal.
720- Setting: `hour_format`
721- Default: `hour12`
722
723**Options**
724
7251. 12-hour format:
726
727```json
728{
729 "hour_format": "hour12"
730}
731```
732
7332. 24-hour format:
734
735```json
736{
737 "hour_format": "hour24"
738}
739```
740
741## Language Overrides
742
743- Description: Configuration overrides for specific languages.
744- Setting: `language_overrides`
745- Default: `null`
746
747**Options**
748
749To override settings for a language, add an entry for that languages name to the `language_overrides` value. Example:
750
751```json
752"language_overrides": {
753 "C": {
754 "format_on_save": "off",
755 "preferred_line_length": 64,
756 "soft_wrap": "preferred_line_length"
757 },
758 "JSON": {
759 "tab_size": 4
760 }
761}
762```
763
764The following settings can be overridden for each specific language:
765
766- `enable_language_server`
767- `ensure_final_newline_on_save`
768- `format_on_save`
769- `formatter`
770- `hard_tabs`
771- `preferred_line_length`
772- `remove_trailing_whitespace_on_save`
773- `show_copilot_suggestions`
774- `show_whitespaces`
775- `soft_wrap`
776- `tab_size`
777- `use_autoclose`
778- `always_treat_brackets_as_autoclosed`
779
780These values take in the same options as the root-level settings with the same name.
781
782## Preview tabs
783
784- Description:
785 (requires Zed `0.132.x`) \
786 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. \
787 There are several ways to convert a preview tab into a regular tab:
788
789 - Double-clicking on the file
790 - Double-clicking on the tab header
791 - Using the `project_panel::OpenPermanent` action
792 - Editing the file
793 - Dragging the file to a different pane
794
795- Setting: `preview_tabs`
796- Default:
797
798```json
799"preview_tabs": {
800 "enabled": true,
801 "enable_preview_from_file_finder": false
802}
803```
804
805### Enable preview from file finder
806
807- Description: Determines whether to open files in preview mode when selected from the file finder.
808- Setting: `enable_preview_from_file_finder`
809- Default: `false`
810
811**Options**
812
813`boolean` values
814
815## Preferred Line Length
816
817- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
818- Setting: `preferred_line_length`
819- Default: `80`
820
821**Options**
822
823`integer` values
824
825## Projects Online By Default
826
827- Description: Whether or not to show the online projects view by default.
828- Setting: `projects_online_by_default`
829- Default: `true`
830
831**Options**
832
833`boolean` values
834
835## Remove Trailing Whitespace On Save
836
837- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
838- Setting: `remove_trailing_whitespace_on_save`
839- Default: `true`
840
841**Options**
842
843`boolean` values
844
845## Show Call Status Icon
846
847- Description: Whether or not to show the call status icon in the status bar.
848- Setting: `show_call_status_icon`
849- Default: `true`
850
851**Options**
852
853`boolean` values
854
855## Show Completions On Input
856
857- Description: Whether or not to show completions as you type.
858- Setting: `show_completions_on_input`
859- Default: `true`
860
861**Options**
862
863`boolean` values
864
865## Show Completion Documentation
866
867- Description: Whether to display inline and alongside documentation for items in the completions menu.
868- Setting: `show_completion_documentation`
869- Default: `true`
870
871**Options**
872
873`boolean` values
874
875## Completion Documentation Debounce Delay
876
877- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
878- Setting: `completion_documentation_secondary_query_debounce`
879- Default: `300` ms
880
881**Options**
882
883`integer` values
884
885## Show Copilot Suggestions
886
887- Description: Whether or not to show Copilot suggestions as you type or wait for a `copilot::Toggle`.
888- Setting: `show_copilot_suggestions`
889- Default: `true`
890
891**Options**
892
893`boolean` values
894
895## Show Whitespaces
896
897- Description: Whether or not to show render whitespace characters in the editor.
898- Setting: `show_whitespaces`
899- Default: `selection`
900
901**Options**
902
9031. `all`
9042. `selection`
9053. `none`
906
907## Soft Wrap
908
909- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
910- Setting: `soft_wrap`
911- Default: `none`
912
913**Options**
914
9151. `editor_width`
9162. `preferred_line_length`
9173. `none`
918
919## Tab Size
920
921- Description: The number of spaces to use for each tab character.
922- Setting: `tab_size`
923- Default: `4`
924
925**Options**
926
927`integer` values
928
929## Telemetry
930
931- Description: Control what info is collected by Zed.
932- Setting: `telemetry`
933- Default:
934
935```json
936"telemetry": {
937 "diagnostics": true,
938 "metrics": true
939},
940```
941
942**Options**
943
944### Diagnostics
945
946- Description: Setting for sending debug-related data, such as crash reports.
947- Setting: `diagnostics`
948- Default: `true`
949
950**Options**
951
952`boolean` values
953
954### Metrics
955
956- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
957- Setting: `metrics`
958- Default: `true`
959
960**Options**
961
962`boolean` values
963
964## Terminal
965
966- Description: Configuration for the terminal.
967- Setting: `terminal`
968- Default:
969
970```json
971"terminal": {
972 "alternate_scroll": "off",
973 "blinking": "terminal_controlled",
974 "copy_on_select": false,
975 "env": {},
976 "font_family": null,
977 "font_features": null,
978 "font_size": null,
979 "option_as_meta": false,
980 "button": false,
981 "shell": {},
982 "toolbar": {
983 "title": true
984 },
985 "working_directory": "current_project_directory"
986}
987```
988
989### Alternate Scroll
990
991- 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.
992- Setting: `alternate_scroll`
993- Default: `off`
994
995**Options**
996
9971. Default alternate scroll mode to on
998
999```json
1000{
1001 "alternate_scroll": "on"
1002}
1003```
1004
10052. Default alternate scroll mode to off
1006
1007```json
1008{
1009 "alternate_scroll": "off"
1010}
1011```
1012
1013### Blinking
1014
1015- Description: Set the cursor blinking behavior in the terminal
1016- Setting: `blinking`
1017- Default: `terminal_controlled`
1018
1019**Options**
1020
10211. Never blink the cursor, ignore the terminal mode
1022
1023```json
1024{
1025 "blinking": "off"
1026}
1027```
1028
10292. Default the cursor blink to off, but allow the terminal to turn blinking on
1030
1031```json
1032{
1033 "blinking": "terminal_controlled"
1034}
1035```
1036
10373. Always blink the cursor, ignore the terminal mode
1038
1039```json
1040"blinking": "on",
1041```
1042
1043### Copy On Select
1044
1045- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1046- Setting: `copy_on_select`
1047- Default: `false`
1048
1049**Options**
1050
1051`boolean` values
1052
1053### Env
1054
1055- 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
1056- Setting: `env`
1057- Default: `{}`
1058
1059**Example**
1060
1061```json
1062"env": {
1063 "ZED": "1",
1064 "KEY": "value1:value2"
1065}
1066```
1067
1068### Font Size
1069
1070- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1071- Setting: `font_size`
1072- Default: `null`
1073
1074**Options**
1075
1076`integer` values
1077
1078### Font Family
1079
1080- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1081- Setting: `font_family`
1082- Default: `null`
1083
1084**Options**
1085
1086The name of any font family installed on the user's system
1087
1088### Font Features
1089
1090- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1091- Setting: `font_features`
1092- Default: `null`
1093
1094**Options**
1095
1096See Buffer Font Features
1097
1098### Option As Meta
1099
1100- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1101- Setting: `option_as_meta`
1102- Default: `true`
1103
1104**Options**
1105
1106`boolean` values
1107
1108### Shell
1109
1110- Description: What shell to use when launching the terminal.
1111- Setting: `shell`
1112- Default: `system`
1113
1114**Options**
1115
11161. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1117
1118```json
1119{
1120 "shell": "system"
1121}
1122```
1123
11242. A program to launch:
1125
1126```json
1127"shell": {
1128 "program": "sh"
1129}
1130```
1131
11323. A program with arguments:
1133
1134```json
1135"shell": {
1136 "with_arguments": {
1137 "program": "/bin/bash",
1138 "args": ["--login"]
1139 }
1140}
1141```
1142
1143## Terminal Toolbar
1144
1145- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1146- Setting: `toolbar`
1147- Default:
1148
1149```json
1150"toolbar": {
1151 "title": true,
1152},
1153```
1154
1155**Options**
1156
1157At 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.
1158
1159### Terminal Button
1160
1161- Description: Control to show or hide the terminal button in the status bar
1162- Setting: `button`
1163- Default: `true`
1164
1165**Options**
1166
1167`boolean` values
1168
1169### Working Directory
1170
1171- Description: What working directory to use when launching the terminal.
1172- Setting: `working_directory`
1173- Default: `"current_project_directory"`
1174
1175**Options**
1176
11771. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1178
1179```json
1180{
1181 "working_directory": "current_project_directory"
1182}
1183```
1184
11852. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1186
1187```json
1188{
1189 "working_directory": "first_project_directory"
1190}
1191```
1192
11933. Always use this platform's home directory (if we can find it)
1194
1195```json
1196{
1197 "working_directory": "always_home"
1198}
1199```
1200
12014. 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.
1202
1203```json
1204"working_directory": {
1205 "always": {
1206 "directory": "~/zed/projects/"
1207 }
1208}
1209```
1210
1211## Theme
1212
1213- 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.
1214- Setting: `theme`
1215- Default: `One Dark`
1216
1217### Theme Object
1218
1219- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1220- Setting: `theme`
1221- Default:
1222
1223```json
1224"theme": {
1225 "mode": "dark",
1226 "dark": "One Dark",
1227 "light": "One Light"
1228},
1229```
1230
1231### Mode
1232
1233- Description: Specify theme mode.
1234- Setting: `mode`
1235- Default: `dark`
1236
1237**Options**
1238
12391. Set the theme to dark mode
1240
1241```json
1242{
1243 "mode": "dark"
1244}
1245```
1246
12472. Set the theme to light mode
1248
1249```json
1250{
1251 "mode": "light"
1252}
1253```
1254
12553. Set the theme to system mode
1256
1257```json
1258{
1259 "mode": "system"
1260}
1261```
1262
1263### Dark
1264
1265- Description: The name of the dark Zed theme to use for the UI.
1266- Setting: `dark`
1267- Default: `One Dark`
1268
1269**Options**
1270
1271Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1272
1273### Light
1274
1275- Description: The name of the light Zed theme to use for the UI.
1276- Setting: `light`
1277- Default: `One Light`
1278
1279**Options**
1280
1281Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1282
1283## Vim
1284
1285- Description: Whether or not to enable vim mode (work in progress).
1286- Setting: `vim_mode`
1287- Default: `false`
1288
1289## Project Panel
1290
1291- Description: Customise project panel
1292- Setting: `project_panel`
1293- Default:
1294
1295```json
1296"project_panel": {
1297 "button": true,
1298 "dock": "left",
1299 "git_status": true,
1300 "default_width": "N/A - width in pixels"
1301},
1302```
1303
1304### Dock
1305
1306- Description: Control the position of the dock
1307- Setting: `dock`
1308- Default: `left`
1309
1310**Options**
1311
13121. Default dock position to left
1313
1314```json
1315{
1316 "dock": "left"
1317}
1318```
1319
13202. Default dock position to right
1321
1322```json
1323{
1324 "dock": "right"
1325}
1326```
1327
1328### Git Status
1329
1330- Description: Indicates newly created and updated files
1331- Setting: `git_status`
1332- Default: `true`
1333
13341. Default enable git status
1335
1336```json
1337{
1338 "git_status": true
1339}
1340```
1341
13422. Default disable git status
1343
1344```json
1345{
1346 "git_status": false
1347}
1348```
1349
1350### Default Width
1351
1352- Description: Customise default width taken by project panel
1353- Setting: `default_width`
1354- Default: N/A width in pixels (eg: 420)
1355
1356**Options**
1357
1358`boolean` values
1359
1360## Calls
1361
1362- Description: Customise behaviour when participating in a call
1363- Setting: `calls`
1364- Default:
1365
1366```json
1367"calls": {
1368 // Join calls with the microphone live by default
1369 "mute_on_join": false,
1370 // Share your project when you are the first to join a channel
1371 "share_on_join": true
1372},
1373```
1374
1375## An example configuration:
1376
1377```json
1378// ~/.config/zed/settings.json
1379{
1380 "theme": "cave-light",
1381 "tab_size": 2,
1382 "preferred_line_length": 80,
1383 "soft_wrap": "none",
1384
1385 "buffer_font_size": 18,
1386 "buffer_font_family": "Zed Mono",
1387
1388 "autosave": "on_focus_change",
1389 "format_on_save": "off",
1390 "vim_mode": false,
1391 "projects_online_by_default": true,
1392 "terminal": {
1393 "font_family": "FiraCode Nerd Font Mono",
1394 "blinking": "off"
1395 },
1396 "language_overrides": {
1397 "C": {
1398 "format_on_save": "language_server",
1399 "preferred_line_length": 64,
1400 "soft_wrap": "preferred_line_length"
1401 }
1402 }
1403}
1404```