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- `languages`
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 all OpenType features that can be enabled, disabled or set a value to a font feature for a given buffer or terminal font.
114
115For example, to disable ligatures and set `7` to `cv01` for a given font you can add the following to your settings:
116
117```json
118{
119 "buffer_font_features": {
120 "calt": false,
121 "cv01": 7
122 }
123}
124```
125
126## Buffer Font Size
127
128- Description: The default font size for text in the editor.
129- Setting: `buffer_font_size`
130- Default: `15`
131
132**Options**
133
134`integer` values
135
136## Confirm Quit
137
138- Description: Whether or not to prompt the user to confirm before closing the application.
139- Setting: `confirm_quit`
140- Default: `false`
141
142**Options**
143
144`boolean` values
145
146## Centered Layout
147
148- Description: Configuration for the centered layout mode.
149- Setting: `centered_layout`
150- Default:
151
152```json
153"centered_layout": {
154 "left_padding": 0.2,
155 "right_padding": 0.2,
156}
157```
158
159**Options**
160
161The `left_padding` and `right_padding` options define the relative width of the
162left 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`.
163
164## Copilot
165
166- Description: Copilot-specific settings.
167- Setting: `copilot`
168- Default:
169
170```json
171"copilot": {
172 "disabled_globs": [
173 ".env"
174 ]
175}
176```
177
178**Options**
179
180### Disabled Globs
181
182- Description: The set of glob patterns for which Copilot should be disabled in any matching file.
183- Setting: `disabled_globs`
184- Default: [".env"]
185
186**Options**
187
188List of `string` values
189
190## Current Line Highlight
191
192- Description: How to highlight the current line in the editor.
193- Setting: `current_line_highlight`
194- Default: `all`
195
196**Options**
197
1981. Don't highlight the current line:
199
200```json
201"current_line_highlight": "none"
202```
203
2042. Highlight the gutter area.
205
206```json
207"current_line_highlight": "gutter"
208```
209
2103. Highlight the editor area.
211
212```json
213"current_line_highlight": "line"
214```
215
2164. Highlight the full line.
217
218```json
219"current_line_highlight": "all"
220```
221
222## Cursor Blink
223
224- Description: Whether or not the cursor blinks.
225- Setting: `cursor_blink`
226- Default: `true`
227
228**Options**
229
230`boolean` values
231
232## Default Dock Anchor
233
234- Description: The default anchor for new docks.
235- Setting: `default_dock_anchor`
236- Default: `bottom`
237
238**Options**
239
2401. Position the dock attached to the bottom of the workspace: `bottom`
2412. Position the dock to the right of the workspace like a side panel: `right`
2423. Position the dock full screen over the entire workspace: `expanded`
243
244## Editor Scrollbar
245
246- Description: Whether or not to show the editor scrollbar and various elements in it.
247- Setting: `scrollbar`
248- Default:
249
250```json
251"scrollbar": {
252 "show": "auto",
253 "cursors": true,
254 "git_diff": true,
255 "search_results": true,
256 "selected_symbol": true,
257 "diagnostics": true
258},
259```
260
261### Show Mode
262
263- Description: When to show the editor scrollbar.
264- Setting: `show`
265- Default: `auto`
266
267**Options**
268
2691. Show the scrollbar if there's important information or follow the system's configured behavior:
270
271```json
272"scrollbar": {
273 "show": "auto"
274}
275```
276
2772. Match the system's configured behavior:
278
279```json
280"scrollbar": {
281 "show": "system"
282}
283```
284
2853. Always show the scrollbar:
286
287```json
288"scrollbar": {
289 "show": "always"
290}
291```
292
2934. Never show the scrollbar:
294
295```json
296"scrollbar": {
297 "show": "never"
298}
299```
300
301### Cursor Indicators
302
303- Description: Whether to show cursor positions in the scrollbar.
304- Setting: `cursors`
305- Default: `true`
306
307**Options**
308
309`boolean` values
310
311### Git Diff Indicators
312
313- Description: Whether to show git diff indicators in the scrollbar.
314- Setting: `git_diff`
315- Default: `true`
316
317**Options**
318
319`boolean` values
320
321### Search Results Indicators
322
323- Description: Whether to show buffer search results in the scrollbar.
324- Setting: `search_results`
325- Default: `true`
326
327**Options**
328
329`boolean` values
330
331### Selected Symbols Indicators
332
333- Description: Whether to show selected symbol occurrences in the scrollbar.
334- Setting: `selected_symbol`
335- Default: `true`
336
337**Options**
338
339`boolean` values
340
341### Diagnostics
342
343- Description: Whether to show diagnostic indicators in the scrollbar.
344- Setting: `diagnostics`
345- Default: `true`
346
347**Options**
348
349`boolean` values
350
351## Editor Tab Bar
352
353- Description: Settings related to the editor's tab bar.
354- Settings: `tab_bar`
355- Default:
356
357```json
358"tab_bar": {
359 "show": true,
360 "show_nav_history_buttons": true
361}
362```
363
364### Show
365
366- Description: Whether or not to show the tab bar in the editor.
367- Setting: `show`
368- Default: `true`
369
370**Options**
371
372`boolean` values
373
374### Navigation History Buttons
375
376- Description: Whether or not to show the navigation history buttons.
377- Setting: `show_nav_history_buttons`
378- Default: `true`
379
380**Options**
381
382`boolean` values
383
384## Editor Tabs
385
386- Description: Configuration for the editor tabs.
387- Setting: `tabs`
388- Default:
389
390```json
391"tabs": {
392 "close_position": "right",
393 "git_status": false
394},
395```
396
397### Close Position
398
399- Description: Where to display close button within a tab.
400- Setting: `close_position`
401- Default: `right`
402
403**Options**
404
4051. Display the close button on the right:
406
407```json
408{
409 "close_position": "right"
410}
411```
412
4132. Display the close button on the left:
414
415```json
416{
417 "close_position": "left"
418}
419```
420
421### Git Status
422
423- Description: Whether or not to show Git file status in tab.
424- Setting: `git_status`
425- Default: `false`
426
427## Editor Toolbar
428
429- Description: Whether or not to show various elements in the editor toolbar.
430- Setting: `toolbar`
431- Default:
432
433```json
434"toolbar": {
435 "breadcrumbs": true,
436 "quick_actions": true
437},
438```
439
440**Options**
441
442Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
443
444## Enable Language Server
445
446- Description: Whether or not to use language servers to provide code intelligence.
447- Setting: `enable_language_server`
448- Default: `true`
449
450**Options**
451
452`boolean` values
453
454## Ensure Final Newline On Save
455
456- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
457- Setting: `ensure_final_newline_on_save`
458- Default: `true`
459
460**Options**
461
462`boolean` values
463
464## LSP
465
466- Description: Configuration for language servers.
467- Setting: `lsp`
468- Default: `null`
469
470**Options**
471
472The following settings can be overridden for specific language servers:
473
474- `initialization_options`
475
476To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
477
478```json
479"lsp": {
480 "rust-analyzer": {
481 "initialization_options": {
482 "check": {
483 "command": "clippy" // rust-analyzer.check.command (default: "check")
484 }
485 }
486 }
487}
488```
489
490## Format On Save
491
492- Description: Whether or not to perform a buffer format before saving.
493- Setting: `format_on_save`
494- Default: `on`
495
496**Options**
497
4981. `on`, enables format on save obeying `formatter` setting:
499
500```json
501{
502 "format_on_save": "on"
503}
504```
505
5062. `off`, disables format on save:
507
508```json
509{
510 "format_on_save": "off"
511}
512```
513
514## Formatter
515
516- Description: How to perform a buffer format.
517- Setting: `formatter`
518- Default: `auto`
519
520**Options**
521
5221. To use the current language server, use `"language_server"`:
523
524```json
525{
526 "formatter": "language_server"
527}
528```
529
5302. 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):
531
532```json
533{
534 "formatter": {
535 "external": {
536 "command": "sed",
537 "arguments": ["-e", "s/ *$//"]
538 }
539 }
540}
541```
542
5433. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
544
545```json
546{
547 "formatter": {
548 "code_actions": {
549 // Use ESLint's --fix:
550 "source.fixAll.eslint": true,
551 // Organize imports on save:
552 "source.organizeImports": true
553 }
554 }
555}
556```
557
558## Code Actions On Format
559
560- Description: The code actions to perform with the primary language server when formatting the buffer.
561- Setting: `code_actions_on_format`
562- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
563
564**Examples**
565
5661. Organize imports on format in TypeScript and TSX buffers:
567
568```json
569{
570 "languages": {
571 "TypeScript": {
572 "code_actions_on_format": {
573 "source.organizeImports": true
574 }
575 },
576 "TSX": {
577 "code_actions_on_format": {
578 "source.organizeImports": true
579 }
580 }
581 }
582}
583```
584
5852. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
586
587```json
588{
589 "languages": {
590 "JavaScript": {
591 "code_actions_on_format": {
592 "source.fixAll.eslint": true
593 }
594 }
595 }
596}
597```
598
5993. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
600
601```json
602{
603 "languages": {
604 "JavaScript": {
605 "code_actions_on_format": {
606 "source.fixAll.eslint": true
607 }
608 }
609 },
610 "lsp": {
611 "eslint": {
612 "settings": {
613 "codeActionOnSave": {
614 "rules": ["import/order"]
615 }
616 }
617 }
618 }
619}
620```
621
622## Auto close
623
624- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
625- Setting: `use_autoclose`
626- Default: `true`
627
628**Options**
629
630`boolean` values
631
632## Always Treat Brackets As Autoclosed
633
634- Description: Controls how the editor handles the autoclosed characters.
635- Setting: `always_treat_brackets_as_autoclosed`
636- Default: `false`
637
638**Options**
639
640`boolean` values
641
642**Example**
643
644If the setting is set to `true`:
645
6461. Enter in the editor: `)))`
6472. Move the cursor to the start: `^)))`
6483. Enter again: `)))`
649
650The result is still `)))` and not `))))))`, which is what it would be by default.
651
652## File Types
653
654- Setting: `file_types`
655- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
656- Default: `{}`
657
658**Examples**
659
660To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
661
662```json
663{
664 "file_types": {
665 "C++": ["c"],
666 "TOML": ["MyLockFile"],
667 "Dockerfile": ["Dockerfile*"]
668 }
669}
670```
671
672## Git
673
674- Description: Configuration for git-related features.
675- Setting: `git`
676- Default:
677
678```json
679{
680 "git": {
681 "git_gutter": "tracked_files",
682 "inline_blame": {
683 "enabled": true
684 }
685 }
686}
687```
688
689### Git Gutter
690
691- Description: Whether or not to show the git gutter.
692- Setting: `git_gutter`
693- Default: `tracked_files`
694
695**Options**
696
6971. Show git gutter in tracked files
698
699```json
700{
701 "git": {
702 "git_gutter": "tracked_files"
703 }
704}
705```
706
7072. Hide git gutter
708
709```json
710{
711 "git": {
712 "git_gutter": "hide"
713 }
714}
715```
716
717### Indent Guides
718
719- Description: Configuration related to indent guides (requires Zed `0.138.0`). Indent guides can be configured separately for each language.
720- Setting: `indent_guides`
721- Default:
722
723```json
724{
725 "indent_guides": {
726 "enabled": true,
727 "line_width": 1,
728 "coloring": "fixed",
729 "background_coloring": "disabled"
730 }
731}
732```
733
734**Options**
735
7361. Disable indent guides
737
738```json
739{
740 "indent_guides": {
741 "enabled": false
742 }
743}
744```
745
7462. Enable indent guides for a specific language.
747
748```json
749{
750 "languages": {
751 "Python": {
752 "indent_guides": {
753 "enabled": true
754 }
755 }
756 }
757}
758```
759
7603. Enable indent aware coloring ("rainbow indentation").
761The colors that are used for different indentation levels are defined in the theme (theme key: `accents`). They can be customized by using theme overrides.
762
763```json
764{
765 "indent_guides": {
766 "enabled": true,
767 "coloring": "indent_aware"
768 }
769}
770```
771
7724. Enable indent aware background coloring ("rainbow indentation").
773The colors that are used for different indentation levels are defined in the theme (theme key: `accents`). They can be customized by using theme overrides.
774
775```json
776{
777 "indent_guides": {
778 "enabled": true,
779 "coloring": "indent_aware",
780 "background_coloring": "indent_aware"
781 }
782}
783```
784
785### Inline Git Blame
786
787- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
788- Setting: `inline_blame`
789- Default:
790
791```json
792{
793 "git": {
794 "inline_blame": {
795 "enabled": true
796 }
797 }
798}
799```
800
801**Options**
802
8031. Disable inline git blame:
804
805```json
806{
807 "git": {
808 "inline_blame": {
809 "enabled": false
810 }
811 }
812}
813```
814
8152. Only show inline git blame after a delay (that starts after cursor stops moving):
816
817```json
818{
819 "git": {
820 "inline_blame": {
821 "enabled": false,
822 "delay_ms": 500
823 }
824 }
825}
826```
827
828## Hard Tabs
829
830- Description: Whether to indent lines using tab characters or multiple spaces.
831- Setting: `hard_tabs`
832- Default: `false`
833
834**Options**
835
836`boolean` values
837
838## Hover Popover Enabled
839
840- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
841- Setting: `hover_popover_enabled`
842- Default: `true`
843
844**Options**
845
846`boolean` values
847
848## Inlay hints
849
850- Description: Configuration for displaying extra text with hints in the editor.
851- Setting: `inlay_hints`
852- Default:
853
854```json
855"inlay_hints": {
856 "enabled": false,
857 "show_type_hints": true,
858 "show_parameter_hints": true,
859 "show_other_hints": true,
860 "edit_debounce_ms": 700,
861 "scroll_debounce_ms": 50
862}
863```
864
865**Options**
866
867Inlay hints querying consists of two parts: editor (client) and LSP server.
868With 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.
869At 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.
870
871The following languages have inlay hints preconfigured by Zed:
872
873- [Go](https://docs.zed.dev/languages/go)
874- [Rust](https://docs.zed.dev/languages/rust)
875- [Svelte](https://docs.zed.dev/languages/svelte)
876- [Typescript](https://docs.zed.dev/languages/typescript)
877
878Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
879
880Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
881Settings-related hint updates are not debounced.
882
883## Journal
884
885- Description: Configuration for the journal.
886- Setting: `journal`
887- Default:
888
889```json
890"journal": {
891 "path": "~",
892 "hour_format": "hour12"
893}
894```
895
896### Path
897
898- Description: The path of the directory where journal entries are stored.
899- Setting: `path`
900- Default: `~`
901
902**Options**
903
904`string` values
905
906### Hour Format
907
908- Description: The format to use for displaying hours in the journal.
909- Setting: `hour_format`
910- Default: `hour12`
911
912**Options**
913
9141. 12-hour format:
915
916```json
917{
918 "hour_format": "hour12"
919}
920```
921
9222. 24-hour format:
923
924```json
925{
926 "hour_format": "hour24"
927}
928```
929
930## Languages
931
932- Description: Configuration for specific languages.
933- Setting: `languages`
934- Default: `null`
935
936**Options**
937
938To override settings for a language, add an entry for that languages name to the `languages` value. Example:
939
940```json
941"languages": {
942 "C": {
943 "format_on_save": "off",
944 "preferred_line_length": 64,
945 "soft_wrap": "preferred_line_length"
946 },
947 "JSON": {
948 "tab_size": 4
949 }
950}
951```
952
953The following settings can be overridden for each specific language:
954
955- `enable_language_server`
956- `ensure_final_newline_on_save`
957- `format_on_save`
958- `formatter`
959- `hard_tabs`
960- `preferred_line_length`
961- `remove_trailing_whitespace_on_save`
962- `show_copilot_suggestions`
963- `show_whitespaces`
964- `soft_wrap`
965- `tab_size`
966- `use_autoclose`
967- `always_treat_brackets_as_autoclosed`
968
969These values take in the same options as the root-level settings with the same name.
970
971## Preview tabs
972
973- Description:
974 (requires Zed `0.132.x`) \
975 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. \
976 There are several ways to convert a preview tab into a regular tab:
977
978 - Double-clicking on the file
979 - Double-clicking on the tab header
980 - Using the `project_panel::OpenPermanent` action
981 - Editing the file
982 - Dragging the file to a different pane
983
984- Setting: `preview_tabs`
985- Default:
986
987```json
988"preview_tabs": {
989 "enabled": true,
990 "enable_preview_from_file_finder": false,
991 "enable_preview_from_code_navigation": false,
992}
993```
994
995### Enable preview from file finder
996
997- Description: Determines whether to open files in preview mode when selected from the file finder.
998- Setting: `enable_preview_from_file_finder`
999- Default: `false`
1000
1001**Options**
1002
1003`boolean` values
1004
1005### Enable preview from code navigation
1006
1007- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab (requires Zed `0.134.x`).
1008- Setting: `enable_preview_from_code_navigation`
1009- Default: `false`
1010
1011**Options**
1012
1013`boolean` values
1014
1015## Preferred Line Length
1016
1017- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1018- Setting: `preferred_line_length`
1019- Default: `80`
1020
1021**Options**
1022
1023`integer` values
1024
1025## Projects Online By Default
1026
1027- Description: Whether or not to show the online projects view by default.
1028- Setting: `projects_online_by_default`
1029- Default: `true`
1030
1031**Options**
1032
1033`boolean` values
1034
1035## Remove Trailing Whitespace On Save
1036
1037- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1038- Setting: `remove_trailing_whitespace_on_save`
1039- Default: `true`
1040
1041**Options**
1042
1043`boolean` values
1044
1045## Show Call Status Icon
1046
1047- Description: Whether or not to show the call status icon in the status bar.
1048- Setting: `show_call_status_icon`
1049- Default: `true`
1050
1051**Options**
1052
1053`boolean` values
1054
1055## Show Completions On Input
1056
1057- Description: Whether or not to show completions as you type.
1058- Setting: `show_completions_on_input`
1059- Default: `true`
1060
1061**Options**
1062
1063`boolean` values
1064
1065## Show Completion Documentation
1066
1067- Description: Whether to display inline and alongside documentation for items in the completions menu.
1068- Setting: `show_completion_documentation`
1069- Default: `true`
1070
1071**Options**
1072
1073`boolean` values
1074
1075## Completion Documentation Debounce Delay
1076
1077- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1078- Setting: `completion_documentation_secondary_query_debounce`
1079- Default: `300` ms
1080
1081**Options**
1082
1083`integer` values
1084
1085## Show Copilot Suggestions
1086
1087- Description: Whether or not to show Copilot suggestions as you type or wait for a `copilot::Toggle`.
1088- Setting: `show_copilot_suggestions`
1089- Default: `true`
1090
1091**Options**
1092
1093`boolean` values
1094
1095## Show Whitespaces
1096
1097- Description: Whether or not to show render whitespace characters in the editor.
1098- Setting: `show_whitespaces`
1099- Default: `selection`
1100
1101**Options**
1102
11031. `all`
11042. `selection`
11053. `none`
11064. `boundaries`
1107
1108## Soft Wrap
1109
1110- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1111- Setting: `soft_wrap`
1112- Default: `none`
1113
1114**Options**
1115
11161. `editor_width`
11172. `preferred_line_length`
11183. `none`
1119
1120## Tab Size
1121
1122- Description: The number of spaces to use for each tab character.
1123- Setting: `tab_size`
1124- Default: `4`
1125
1126**Options**
1127
1128`integer` values
1129
1130## Telemetry
1131
1132- Description: Control what info is collected by Zed.
1133- Setting: `telemetry`
1134- Default:
1135
1136```json
1137"telemetry": {
1138 "diagnostics": true,
1139 "metrics": true
1140},
1141```
1142
1143**Options**
1144
1145### Diagnostics
1146
1147- Description: Setting for sending debug-related data, such as crash reports.
1148- Setting: `diagnostics`
1149- Default: `true`
1150
1151**Options**
1152
1153`boolean` values
1154
1155### Metrics
1156
1157- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1158- Setting: `metrics`
1159- Default: `true`
1160
1161**Options**
1162
1163`boolean` values
1164
1165## Terminal
1166
1167- Description: Configuration for the terminal.
1168- Setting: `terminal`
1169- Default:
1170
1171```json
1172"terminal": {
1173 "alternate_scroll": "off",
1174 "blinking": "terminal_controlled",
1175 "copy_on_select": false,
1176 "env": {},
1177 "font_family": null,
1178 "font_features": null,
1179 "font_size": null,
1180 "option_as_meta": false,
1181 "button": false,
1182 "shell": {},
1183 "toolbar": {
1184 "title": true
1185 },
1186 "working_directory": "current_project_directory"
1187}
1188```
1189
1190### Alternate Scroll
1191
1192- 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.
1193- Setting: `alternate_scroll`
1194- Default: `off`
1195
1196**Options**
1197
11981. Default alternate scroll mode to on
1199
1200```json
1201{
1202 "alternate_scroll": "on"
1203}
1204```
1205
12062. Default alternate scroll mode to off
1207
1208```json
1209{
1210 "alternate_scroll": "off"
1211}
1212```
1213
1214### Blinking
1215
1216- Description: Set the cursor blinking behavior in the terminal
1217- Setting: `blinking`
1218- Default: `terminal_controlled`
1219
1220**Options**
1221
12221. Never blink the cursor, ignore the terminal mode
1223
1224```json
1225{
1226 "blinking": "off"
1227}
1228```
1229
12302. Default the cursor blink to off, but allow the terminal to turn blinking on
1231
1232```json
1233{
1234 "blinking": "terminal_controlled"
1235}
1236```
1237
12383. Always blink the cursor, ignore the terminal mode
1239
1240```json
1241"blinking": "on",
1242```
1243
1244### Copy On Select
1245
1246- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1247- Setting: `copy_on_select`
1248- Default: `false`
1249
1250**Options**
1251
1252`boolean` values
1253
1254### Env
1255
1256- 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
1257- Setting: `env`
1258- Default: `{}`
1259
1260**Example**
1261
1262```json
1263"env": {
1264 "ZED": "1",
1265 "KEY": "value1:value2"
1266}
1267```
1268
1269### Font Size
1270
1271- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1272- Setting: `font_size`
1273- Default: `null`
1274
1275**Options**
1276
1277`integer` values
1278
1279### Font Family
1280
1281- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1282- Setting: `font_family`
1283- Default: `null`
1284
1285**Options**
1286
1287The name of any font family installed on the user's system
1288
1289### Font Features
1290
1291- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1292- Setting: `font_features`
1293- Default: `null`
1294
1295**Options**
1296
1297See Buffer Font Features
1298
1299### Option As Meta
1300
1301- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1302- Setting: `option_as_meta`
1303- Default: `true`
1304
1305**Options**
1306
1307`boolean` values
1308
1309### Shell
1310
1311- Description: What shell to use when launching the terminal.
1312- Setting: `shell`
1313- Default: `system`
1314
1315**Options**
1316
13171. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1318
1319```json
1320{
1321 "shell": "system"
1322}
1323```
1324
13252. A program to launch:
1326
1327```json
1328"shell": {
1329 "program": "sh"
1330}
1331```
1332
13333. A program with arguments:
1334
1335```json
1336"shell": {
1337 "with_arguments": {
1338 "program": "/bin/bash",
1339 "args": ["--login"]
1340 }
1341}
1342```
1343
1344## Terminal Toolbar
1345
1346- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1347- Setting: `toolbar`
1348- Default:
1349
1350```json
1351"toolbar": {
1352 "title": true,
1353},
1354```
1355
1356**Options**
1357
1358At 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.
1359
1360### Terminal Button
1361
1362- Description: Control to show or hide the terminal button in the status bar
1363- Setting: `button`
1364- Default: `true`
1365
1366**Options**
1367
1368`boolean` values
1369
1370### Working Directory
1371
1372- Description: What working directory to use when launching the terminal.
1373- Setting: `working_directory`
1374- Default: `"current_project_directory"`
1375
1376**Options**
1377
13781. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1379
1380```json
1381{
1382 "working_directory": "current_project_directory"
1383}
1384```
1385
13862. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1387
1388```json
1389{
1390 "working_directory": "first_project_directory"
1391}
1392```
1393
13943. Always use this platform's home directory (if we can find it)
1395
1396```json
1397{
1398 "working_directory": "always_home"
1399}
1400```
1401
14024. 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.
1403
1404```json
1405"working_directory": {
1406 "always": {
1407 "directory": "~/zed/projects/"
1408 }
1409}
1410```
1411
1412## Theme
1413
1414- 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.
1415- Setting: `theme`
1416- Default: `One Dark`
1417
1418### Theme Object
1419
1420- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1421- Setting: `theme`
1422- Default:
1423
1424```json
1425"theme": {
1426 "mode": "dark",
1427 "dark": "One Dark",
1428 "light": "One Light"
1429},
1430```
1431
1432### Mode
1433
1434- Description: Specify theme mode.
1435- Setting: `mode`
1436- Default: `dark`
1437
1438**Options**
1439
14401. Set the theme to dark mode
1441
1442```json
1443{
1444 "mode": "dark"
1445}
1446```
1447
14482. Set the theme to light mode
1449
1450```json
1451{
1452 "mode": "light"
1453}
1454```
1455
14563. Set the theme to system mode
1457
1458```json
1459{
1460 "mode": "system"
1461}
1462```
1463
1464### Dark
1465
1466- Description: The name of the dark Zed theme to use for the UI.
1467- Setting: `dark`
1468- Default: `One Dark`
1469
1470**Options**
1471
1472Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1473
1474### Light
1475
1476- Description: The name of the light Zed theme to use for the UI.
1477- Setting: `light`
1478- Default: `One Light`
1479
1480**Options**
1481
1482Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1483
1484## Vim
1485
1486- Description: Whether or not to enable vim mode (work in progress).
1487- Setting: `vim_mode`
1488- Default: `false`
1489
1490## Project Panel
1491
1492- Description: Customise project panel
1493- Setting: `project_panel`
1494- Default:
1495
1496```json
1497"project_panel": {
1498 "button": true,
1499 "dock": "left",
1500 "git_status": true,
1501 "default_width": "N/A - width in pixels"
1502},
1503```
1504
1505### Dock
1506
1507- Description: Control the position of the dock
1508- Setting: `dock`
1509- Default: `left`
1510
1511**Options**
1512
15131. Default dock position to left
1514
1515```json
1516{
1517 "dock": "left"
1518}
1519```
1520
15212. Default dock position to right
1522
1523```json
1524{
1525 "dock": "right"
1526}
1527```
1528
1529### Git Status
1530
1531- Description: Indicates newly created and updated files
1532- Setting: `git_status`
1533- Default: `true`
1534
15351. Default enable git status
1536
1537```json
1538{
1539 "git_status": true
1540}
1541```
1542
15432. Default disable git status
1544
1545```json
1546{
1547 "git_status": false
1548}
1549```
1550
1551### Default Width
1552
1553- Description: Customise default width taken by project panel
1554- Setting: `default_width`
1555- Default: N/A width in pixels (eg: 420)
1556
1557**Options**
1558
1559`boolean` values
1560
1561## Calls
1562
1563- Description: Customise behaviour when participating in a call
1564- Setting: `calls`
1565- Default:
1566
1567```json
1568"calls": {
1569 // Join calls with the microphone live by default
1570 "mute_on_join": false,
1571 // Share your project when you are the first to join a channel
1572 "share_on_join": false
1573},
1574```
1575
1576## An example configuration:
1577
1578```json
1579// ~/.config/zed/settings.json
1580{
1581 "theme": "cave-light",
1582 "tab_size": 2,
1583 "preferred_line_length": 80,
1584 "soft_wrap": "none",
1585
1586 "buffer_font_size": 18,
1587 "buffer_font_family": "Zed Mono",
1588
1589 "autosave": "on_focus_change",
1590 "format_on_save": "off",
1591 "vim_mode": false,
1592 "projects_online_by_default": true,
1593 "terminal": {
1594 "font_family": "FiraCode Nerd Font Mono",
1595 "blinking": "off"
1596 },
1597 "languages": {
1598 "C": {
1599 "format_on_save": "language_server",
1600 "preferred_line_length": 64,
1601 "soft_wrap": "preferred_line_length"
1602 }
1603 }
1604}
1605```