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- `inline_completions`
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_inline_completions`
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## Inline Completions
165
166- Description: Settings for inline completions.
167- Setting: `inline_completions`
168- Default:
169
170```json
171"inline_completions": {
172 "disabled_globs": [
173 ".env"
174 ]
175}
176```
177
178**Options**
179
180### Disabled Globs
181
182- Description: A list of globs representing files that inline completions should be disabled for.
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 "active_line_width": 1,
729 "coloring": "fixed",
730 "background_coloring": "disabled"
731 }
732}
733```
734
735**Options**
736
7371. Disable indent guides
738
739```json
740{
741 "indent_guides": {
742 "enabled": false
743 }
744}
745```
746
7472. Enable indent guides for a specific language.
748
749```json
750{
751 "languages": {
752 "Python": {
753 "indent_guides": {
754 "enabled": true
755 }
756 }
757 }
758}
759```
760
7613. Enable indent aware coloring ("rainbow indentation").
762 The colors that are used for different indentation levels are defined in the theme (theme key: `accents`). They can be customized by using theme overrides.
763
764```json
765{
766 "indent_guides": {
767 "enabled": true,
768 "coloring": "indent_aware"
769 }
770}
771```
772
7734. Enable indent aware background coloring ("rainbow indentation").
774 The colors that are used for different indentation levels are defined in the theme (theme key: `accents`). They can be customized by using theme overrides.
775
776```json
777{
778 "indent_guides": {
779 "enabled": true,
780 "coloring": "indent_aware",
781 "background_coloring": "indent_aware"
782 }
783}
784```
785
786### Inline Git Blame
787
788- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
789- Setting: `inline_blame`
790- Default:
791
792```json
793{
794 "git": {
795 "inline_blame": {
796 "enabled": true
797 }
798 }
799}
800```
801
802**Options**
803
8041. Disable inline git blame:
805
806```json
807{
808 "git": {
809 "inline_blame": {
810 "enabled": false
811 }
812 }
813}
814```
815
8162. Only show inline git blame after a delay (that starts after cursor stops moving):
817
818```json
819{
820 "git": {
821 "inline_blame": {
822 "enabled": false,
823 "delay_ms": 500
824 }
825 }
826}
827```
828
829## Hard Tabs
830
831- Description: Whether to indent lines using tab characters or multiple spaces.
832- Setting: `hard_tabs`
833- Default: `false`
834
835**Options**
836
837`boolean` values
838
839## Hover Popover Enabled
840
841- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
842- Setting: `hover_popover_enabled`
843- Default: `true`
844
845**Options**
846
847`boolean` values
848
849## Inlay hints
850
851- Description: Configuration for displaying extra text with hints in the editor.
852- Setting: `inlay_hints`
853- Default:
854
855```json
856"inlay_hints": {
857 "enabled": false,
858 "show_type_hints": true,
859 "show_parameter_hints": true,
860 "show_other_hints": true,
861 "edit_debounce_ms": 700,
862 "scroll_debounce_ms": 50
863}
864```
865
866**Options**
867
868Inlay hints querying consists of two parts: editor (client) and LSP server.
869With 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.
870At 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.
871
872The following languages have inlay hints preconfigured by Zed:
873
874- [Go](https://docs.zed.dev/languages/go)
875- [Rust](https://docs.zed.dev/languages/rust)
876- [Svelte](https://docs.zed.dev/languages/svelte)
877- [Typescript](https://docs.zed.dev/languages/typescript)
878
879Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
880
881Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
882Settings-related hint updates are not debounced.
883
884## Journal
885
886- Description: Configuration for the journal.
887- Setting: `journal`
888- Default:
889
890```json
891"journal": {
892 "path": "~",
893 "hour_format": "hour12"
894}
895```
896
897### Path
898
899- Description: The path of the directory where journal entries are stored.
900- Setting: `path`
901- Default: `~`
902
903**Options**
904
905`string` values
906
907### Hour Format
908
909- Description: The format to use for displaying hours in the journal.
910- Setting: `hour_format`
911- Default: `hour12`
912
913**Options**
914
9151. 12-hour format:
916
917```json
918{
919 "hour_format": "hour12"
920}
921```
922
9232. 24-hour format:
924
925```json
926{
927 "hour_format": "hour24"
928}
929```
930
931## Languages
932
933- Description: Configuration for specific languages.
934- Setting: `languages`
935- Default: `null`
936
937**Options**
938
939To override settings for a language, add an entry for that languages name to the `languages` value. Example:
940
941```json
942"languages": {
943 "C": {
944 "format_on_save": "off",
945 "preferred_line_length": 64,
946 "soft_wrap": "preferred_line_length"
947 },
948 "JSON": {
949 "tab_size": 4
950 }
951}
952```
953
954The following settings can be overridden for each specific language:
955
956- `enable_language_server`
957- `ensure_final_newline_on_save`
958- `format_on_save`
959- `formatter`
960- `hard_tabs`
961- `preferred_line_length`
962- `remove_trailing_whitespace_on_save`
963- `show_inline_completions`
964- `show_whitespaces`
965- `soft_wrap`
966- `tab_size`
967- `use_autoclose`
968- `always_treat_brackets_as_autoclosed`
969
970These values take in the same options as the root-level settings with the same name.
971
972## Preview tabs
973
974- Description:
975 (requires Zed `0.132.x`) \
976 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. \
977 There are several ways to convert a preview tab into a regular tab:
978
979 - Double-clicking on the file
980 - Double-clicking on the tab header
981 - Using the `project_panel::OpenPermanent` action
982 - Editing the file
983 - Dragging the file to a different pane
984
985- Setting: `preview_tabs`
986- Default:
987
988```json
989"preview_tabs": {
990 "enabled": true,
991 "enable_preview_from_file_finder": false,
992 "enable_preview_from_code_navigation": false,
993}
994```
995
996### Enable preview from file finder
997
998- Description: Determines whether to open files in preview mode when selected from the file finder.
999- Setting: `enable_preview_from_file_finder`
1000- Default: `false`
1001
1002**Options**
1003
1004`boolean` values
1005
1006### Enable preview from code navigation
1007
1008- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab (requires Zed `0.134.x`).
1009- Setting: `enable_preview_from_code_navigation`
1010- Default: `false`
1011
1012**Options**
1013
1014`boolean` values
1015
1016## Preferred Line Length
1017
1018- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1019- Setting: `preferred_line_length`
1020- Default: `80`
1021
1022**Options**
1023
1024`integer` values
1025
1026## Projects Online By Default
1027
1028- Description: Whether or not to show the online projects view by default.
1029- Setting: `projects_online_by_default`
1030- Default: `true`
1031
1032**Options**
1033
1034`boolean` values
1035
1036## Remove Trailing Whitespace On Save
1037
1038- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1039- Setting: `remove_trailing_whitespace_on_save`
1040- Default: `true`
1041
1042**Options**
1043
1044`boolean` values
1045
1046## Show Call Status Icon
1047
1048- Description: Whether or not to show the call status icon in the status bar.
1049- Setting: `show_call_status_icon`
1050- Default: `true`
1051
1052**Options**
1053
1054`boolean` values
1055
1056## Show Completions On Input
1057
1058- Description: Whether or not to show completions as you type.
1059- Setting: `show_completions_on_input`
1060- Default: `true`
1061
1062**Options**
1063
1064`boolean` values
1065
1066## Show Completion Documentation
1067
1068- Description: Whether to display inline and alongside documentation for items in the completions menu.
1069- Setting: `show_completion_documentation`
1070- Default: `true`
1071
1072**Options**
1073
1074`boolean` values
1075
1076## Completion Documentation Debounce Delay
1077
1078- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1079- Setting: `completion_documentation_secondary_query_debounce`
1080- Default: `300` ms
1081
1082**Options**
1083
1084`integer` values
1085
1086## Show Inline Completions
1087
1088- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1089- Setting: `show_inline_completions`
1090- Default: `true`
1091
1092**Options**
1093
1094`boolean` values
1095
1096## Show Whitespaces
1097
1098- Description: Whether or not to show render whitespace characters in the editor.
1099- Setting: `show_whitespaces`
1100- Default: `selection`
1101
1102**Options**
1103
11041. `all`
11052. `selection`
11063. `none`
11074. `boundaries`
1108
1109## Soft Wrap
1110
1111- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1112- Setting: `soft_wrap`
1113- Default: `none`
1114
1115**Options**
1116
11171. `editor_width`
11182. `preferred_line_length`
11193. `none`
1120
1121## Wrap Guides (Vertical Rulers)
1122
1123- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1124- Setting: `wrap_guides`
1125- Default: []
1126
1127**Options**
1128
1129List of `integer` column numbers
1130
1131## Tab Size
1132
1133- Description: The number of spaces to use for each tab character.
1134- Setting: `tab_size`
1135- Default: `4`
1136
1137**Options**
1138
1139`integer` values
1140
1141## Telemetry
1142
1143- Description: Control what info is collected by Zed.
1144- Setting: `telemetry`
1145- Default:
1146
1147```json
1148"telemetry": {
1149 "diagnostics": true,
1150 "metrics": true
1151},
1152```
1153
1154**Options**
1155
1156### Diagnostics
1157
1158- Description: Setting for sending debug-related data, such as crash reports.
1159- Setting: `diagnostics`
1160- Default: `true`
1161
1162**Options**
1163
1164`boolean` values
1165
1166### Metrics
1167
1168- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1169- Setting: `metrics`
1170- Default: `true`
1171
1172**Options**
1173
1174`boolean` values
1175
1176## Terminal
1177
1178- Description: Configuration for the terminal.
1179- Setting: `terminal`
1180- Default:
1181
1182```json
1183"terminal": {
1184 "alternate_scroll": "off",
1185 "blinking": "terminal_controlled",
1186 "copy_on_select": false,
1187 "env": {},
1188 "font_family": null,
1189 "font_features": null,
1190 "font_size": null,
1191 "option_as_meta": false,
1192 "button": false,
1193 "shell": {},
1194 "toolbar": {
1195 "title": true
1196 },
1197 "working_directory": "current_project_directory"
1198}
1199```
1200
1201### Alternate Scroll
1202
1203- 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.
1204- Setting: `alternate_scroll`
1205- Default: `off`
1206
1207**Options**
1208
12091. Default alternate scroll mode to on
1210
1211```json
1212{
1213 "alternate_scroll": "on"
1214}
1215```
1216
12172. Default alternate scroll mode to off
1218
1219```json
1220{
1221 "alternate_scroll": "off"
1222}
1223```
1224
1225### Blinking
1226
1227- Description: Set the cursor blinking behavior in the terminal
1228- Setting: `blinking`
1229- Default: `terminal_controlled`
1230
1231**Options**
1232
12331. Never blink the cursor, ignore the terminal mode
1234
1235```json
1236{
1237 "blinking": "off"
1238}
1239```
1240
12412. Default the cursor blink to off, but allow the terminal to turn blinking on
1242
1243```json
1244{
1245 "blinking": "terminal_controlled"
1246}
1247```
1248
12493. Always blink the cursor, ignore the terminal mode
1250
1251```json
1252"blinking": "on",
1253```
1254
1255### Copy On Select
1256
1257- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1258- Setting: `copy_on_select`
1259- Default: `false`
1260
1261**Options**
1262
1263`boolean` values
1264
1265### Env
1266
1267- 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
1268- Setting: `env`
1269- Default: `{}`
1270
1271**Example**
1272
1273```json
1274"env": {
1275 "ZED": "1",
1276 "KEY": "value1:value2"
1277}
1278```
1279
1280### Font Size
1281
1282- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1283- Setting: `font_size`
1284- Default: `null`
1285
1286**Options**
1287
1288`integer` values
1289
1290### Font Family
1291
1292- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1293- Setting: `font_family`
1294- Default: `null`
1295
1296**Options**
1297
1298The name of any font family installed on the user's system
1299
1300### Font Features
1301
1302- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1303- Setting: `font_features`
1304- Default: `null`
1305
1306**Options**
1307
1308See Buffer Font Features
1309
1310### Option As Meta
1311
1312- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1313- Setting: `option_as_meta`
1314- Default: `true`
1315
1316**Options**
1317
1318`boolean` values
1319
1320### Shell
1321
1322- Description: What shell to use when launching the terminal.
1323- Setting: `shell`
1324- Default: `system`
1325
1326**Options**
1327
13281. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1329
1330```json
1331{
1332 "shell": "system"
1333}
1334```
1335
13362. A program to launch:
1337
1338```json
1339"shell": {
1340 "program": "sh"
1341}
1342```
1343
13443. A program with arguments:
1345
1346```json
1347"shell": {
1348 "with_arguments": {
1349 "program": "/bin/bash",
1350 "args": ["--login"]
1351 }
1352}
1353```
1354
1355## Terminal Toolbar
1356
1357- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1358- Setting: `toolbar`
1359- Default:
1360
1361```json
1362"toolbar": {
1363 "title": true,
1364},
1365```
1366
1367**Options**
1368
1369At 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.
1370
1371### Terminal Button
1372
1373- Description: Control to show or hide the terminal button in the status bar
1374- Setting: `button`
1375- Default: `true`
1376
1377**Options**
1378
1379`boolean` values
1380
1381### Working Directory
1382
1383- Description: What working directory to use when launching the terminal.
1384- Setting: `working_directory`
1385- Default: `"current_project_directory"`
1386
1387**Options**
1388
13891. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1390
1391```json
1392{
1393 "working_directory": "current_project_directory"
1394}
1395```
1396
13972. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1398
1399```json
1400{
1401 "working_directory": "first_project_directory"
1402}
1403```
1404
14053. Always use this platform's home directory (if we can find it)
1406
1407```json
1408{
1409 "working_directory": "always_home"
1410}
1411```
1412
14134. 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.
1414
1415```json
1416"working_directory": {
1417 "always": {
1418 "directory": "~/zed/projects/"
1419 }
1420}
1421```
1422
1423## Theme
1424
1425- 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.
1426- Setting: `theme`
1427- Default: `One Dark`
1428
1429### Theme Object
1430
1431- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1432- Setting: `theme`
1433- Default:
1434
1435```json
1436"theme": {
1437 "mode": "dark",
1438 "dark": "One Dark",
1439 "light": "One Light"
1440},
1441```
1442
1443### Mode
1444
1445- Description: Specify theme mode.
1446- Setting: `mode`
1447- Default: `dark`
1448
1449**Options**
1450
14511. Set the theme to dark mode
1452
1453```json
1454{
1455 "mode": "dark"
1456}
1457```
1458
14592. Set the theme to light mode
1460
1461```json
1462{
1463 "mode": "light"
1464}
1465```
1466
14673. Set the theme to system mode
1468
1469```json
1470{
1471 "mode": "system"
1472}
1473```
1474
1475### Dark
1476
1477- Description: The name of the dark Zed theme to use for the UI.
1478- Setting: `dark`
1479- Default: `One Dark`
1480
1481**Options**
1482
1483Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1484
1485### Light
1486
1487- Description: The name of the light Zed theme to use for the UI.
1488- Setting: `light`
1489- Default: `One Light`
1490
1491**Options**
1492
1493Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1494
1495## Vim
1496
1497- Description: Whether or not to enable vim mode (work in progress).
1498- Setting: `vim_mode`
1499- Default: `false`
1500
1501## Project Panel
1502
1503- Description: Customise project panel
1504- Setting: `project_panel`
1505- Default:
1506
1507```json
1508"project_panel": {
1509 "button": true,
1510 "dock": "left",
1511 "git_status": true,
1512 "default_width": "N/A - width in pixels"
1513},
1514```
1515
1516### Dock
1517
1518- Description: Control the position of the dock
1519- Setting: `dock`
1520- Default: `left`
1521
1522**Options**
1523
15241. Default dock position to left
1525
1526```json
1527{
1528 "dock": "left"
1529}
1530```
1531
15322. Default dock position to right
1533
1534```json
1535{
1536 "dock": "right"
1537}
1538```
1539
1540### Git Status
1541
1542- Description: Indicates newly created and updated files
1543- Setting: `git_status`
1544- Default: `true`
1545
15461. Default enable git status
1547
1548```json
1549{
1550 "git_status": true
1551}
1552```
1553
15542. Default disable git status
1555
1556```json
1557{
1558 "git_status": false
1559}
1560```
1561
1562### Default Width
1563
1564- Description: Customise default width taken by project panel
1565- Setting: `default_width`
1566- Default: N/A width in pixels (eg: 420)
1567
1568**Options**
1569
1570`boolean` values
1571
1572## Calls
1573
1574- Description: Customise behaviour when participating in a call
1575- Setting: `calls`
1576- Default:
1577
1578```json
1579"calls": {
1580 // Join calls with the microphone live by default
1581 "mute_on_join": false,
1582 // Share your project when you are the first to join a channel
1583 "share_on_join": false
1584},
1585```
1586
1587## An example configuration:
1588
1589```json
1590// ~/.config/zed/settings.json
1591{
1592 "theme": "cave-light",
1593 "tab_size": 2,
1594 "preferred_line_length": 80,
1595 "soft_wrap": "none",
1596
1597 "buffer_font_size": 18,
1598 "buffer_font_family": "Zed Mono",
1599
1600 "autosave": "on_focus_change",
1601 "format_on_save": "off",
1602 "vim_mode": false,
1603 "projects_online_by_default": true,
1604 "terminal": {
1605 "font_family": "FiraCode Nerd Font Mono",
1606 "blinking": "off"
1607 },
1608 "languages": {
1609 "C": {
1610 "format_on_save": "language_server",
1611 "preferred_line_length": 64,
1612 "soft_wrap": "preferred_line_length"
1613 }
1614 }
1615}
1616```