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 "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_inline_completions`
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 Inline Completions
1086
1087- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1088- Setting: `show_inline_completions`
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## Wrap Guides (Vertical Rulers)
1121
1122- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1123- Setting: `wrap_guides`
1124- Default: []
1125
1126**Options**
1127
1128List of `integer` column numbers
1129
1130## Tab Size
1131
1132- Description: The number of spaces to use for each tab character.
1133- Setting: `tab_size`
1134- Default: `4`
1135
1136**Options**
1137
1138`integer` values
1139
1140## Telemetry
1141
1142- Description: Control what info is collected by Zed.
1143- Setting: `telemetry`
1144- Default:
1145
1146```json
1147"telemetry": {
1148 "diagnostics": true,
1149 "metrics": true
1150},
1151```
1152
1153**Options**
1154
1155### Diagnostics
1156
1157- Description: Setting for sending debug-related data, such as crash reports.
1158- Setting: `diagnostics`
1159- Default: `true`
1160
1161**Options**
1162
1163`boolean` values
1164
1165### Metrics
1166
1167- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1168- Setting: `metrics`
1169- Default: `true`
1170
1171**Options**
1172
1173`boolean` values
1174
1175## Terminal
1176
1177- Description: Configuration for the terminal.
1178- Setting: `terminal`
1179- Default:
1180
1181```json
1182"terminal": {
1183 "alternate_scroll": "off",
1184 "blinking": "terminal_controlled",
1185 "copy_on_select": false,
1186 "env": {},
1187 "font_family": null,
1188 "font_features": null,
1189 "font_size": null,
1190 "option_as_meta": false,
1191 "button": false,
1192 "shell": {},
1193 "toolbar": {
1194 "title": true
1195 },
1196 "working_directory": "current_project_directory"
1197}
1198```
1199
1200### Alternate Scroll
1201
1202- 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.
1203- Setting: `alternate_scroll`
1204- Default: `off`
1205
1206**Options**
1207
12081. Default alternate scroll mode to on
1209
1210```json
1211{
1212 "alternate_scroll": "on"
1213}
1214```
1215
12162. Default alternate scroll mode to off
1217
1218```json
1219{
1220 "alternate_scroll": "off"
1221}
1222```
1223
1224### Blinking
1225
1226- Description: Set the cursor blinking behavior in the terminal
1227- Setting: `blinking`
1228- Default: `terminal_controlled`
1229
1230**Options**
1231
12321. Never blink the cursor, ignore the terminal mode
1233
1234```json
1235{
1236 "blinking": "off"
1237}
1238```
1239
12402. Default the cursor blink to off, but allow the terminal to turn blinking on
1241
1242```json
1243{
1244 "blinking": "terminal_controlled"
1245}
1246```
1247
12483. Always blink the cursor, ignore the terminal mode
1249
1250```json
1251"blinking": "on",
1252```
1253
1254### Copy On Select
1255
1256- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1257- Setting: `copy_on_select`
1258- Default: `false`
1259
1260**Options**
1261
1262`boolean` values
1263
1264### Env
1265
1266- 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
1267- Setting: `env`
1268- Default: `{}`
1269
1270**Example**
1271
1272```json
1273"env": {
1274 "ZED": "1",
1275 "KEY": "value1:value2"
1276}
1277```
1278
1279### Font Size
1280
1281- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1282- Setting: `font_size`
1283- Default: `null`
1284
1285**Options**
1286
1287`integer` values
1288
1289### Font Family
1290
1291- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1292- Setting: `font_family`
1293- Default: `null`
1294
1295**Options**
1296
1297The name of any font family installed on the user's system
1298
1299### Font Features
1300
1301- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1302- Setting: `font_features`
1303- Default: `null`
1304
1305**Options**
1306
1307See Buffer Font Features
1308
1309### Option As Meta
1310
1311- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1312- Setting: `option_as_meta`
1313- Default: `true`
1314
1315**Options**
1316
1317`boolean` values
1318
1319### Shell
1320
1321- Description: What shell to use when launching the terminal.
1322- Setting: `shell`
1323- Default: `system`
1324
1325**Options**
1326
13271. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1328
1329```json
1330{
1331 "shell": "system"
1332}
1333```
1334
13352. A program to launch:
1336
1337```json
1338"shell": {
1339 "program": "sh"
1340}
1341```
1342
13433. A program with arguments:
1344
1345```json
1346"shell": {
1347 "with_arguments": {
1348 "program": "/bin/bash",
1349 "args": ["--login"]
1350 }
1351}
1352```
1353
1354## Terminal Toolbar
1355
1356- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1357- Setting: `toolbar`
1358- Default:
1359
1360```json
1361"toolbar": {
1362 "title": true,
1363},
1364```
1365
1366**Options**
1367
1368At 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.
1369
1370### Terminal Button
1371
1372- Description: Control to show or hide the terminal button in the status bar
1373- Setting: `button`
1374- Default: `true`
1375
1376**Options**
1377
1378`boolean` values
1379
1380### Working Directory
1381
1382- Description: What working directory to use when launching the terminal.
1383- Setting: `working_directory`
1384- Default: `"current_project_directory"`
1385
1386**Options**
1387
13881. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1389
1390```json
1391{
1392 "working_directory": "current_project_directory"
1393}
1394```
1395
13962. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1397
1398```json
1399{
1400 "working_directory": "first_project_directory"
1401}
1402```
1403
14043. Always use this platform's home directory (if we can find it)
1405
1406```json
1407{
1408 "working_directory": "always_home"
1409}
1410```
1411
14124. 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.
1413
1414```json
1415"working_directory": {
1416 "always": {
1417 "directory": "~/zed/projects/"
1418 }
1419}
1420```
1421
1422## Theme
1423
1424- 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.
1425- Setting: `theme`
1426- Default: `One Dark`
1427
1428### Theme Object
1429
1430- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1431- Setting: `theme`
1432- Default:
1433
1434```json
1435"theme": {
1436 "mode": "dark",
1437 "dark": "One Dark",
1438 "light": "One Light"
1439},
1440```
1441
1442### Mode
1443
1444- Description: Specify theme mode.
1445- Setting: `mode`
1446- Default: `dark`
1447
1448**Options**
1449
14501. Set the theme to dark mode
1451
1452```json
1453{
1454 "mode": "dark"
1455}
1456```
1457
14582. Set the theme to light mode
1459
1460```json
1461{
1462 "mode": "light"
1463}
1464```
1465
14663. Set the theme to system mode
1467
1468```json
1469{
1470 "mode": "system"
1471}
1472```
1473
1474### Dark
1475
1476- Description: The name of the dark Zed theme to use for the UI.
1477- Setting: `dark`
1478- Default: `One Dark`
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### Light
1485
1486- Description: The name of the light Zed theme to use for the UI.
1487- Setting: `light`
1488- Default: `One Light`
1489
1490**Options**
1491
1492Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1493
1494## Vim
1495
1496- Description: Whether or not to enable vim mode (work in progress).
1497- Setting: `vim_mode`
1498- Default: `false`
1499
1500## Project Panel
1501
1502- Description: Customise project panel
1503- Setting: `project_panel`
1504- Default:
1505
1506```json
1507"project_panel": {
1508 "button": true,
1509 "dock": "left",
1510 "git_status": true,
1511 "default_width": "N/A - width in pixels"
1512},
1513```
1514
1515### Dock
1516
1517- Description: Control the position of the dock
1518- Setting: `dock`
1519- Default: `left`
1520
1521**Options**
1522
15231. Default dock position to left
1524
1525```json
1526{
1527 "dock": "left"
1528}
1529```
1530
15312. Default dock position to right
1532
1533```json
1534{
1535 "dock": "right"
1536}
1537```
1538
1539### Git Status
1540
1541- Description: Indicates newly created and updated files
1542- Setting: `git_status`
1543- Default: `true`
1544
15451. Default enable git status
1546
1547```json
1548{
1549 "git_status": true
1550}
1551```
1552
15532. Default disable git status
1554
1555```json
1556{
1557 "git_status": false
1558}
1559```
1560
1561### Default Width
1562
1563- Description: Customise default width taken by project panel
1564- Setting: `default_width`
1565- Default: N/A width in pixels (eg: 420)
1566
1567**Options**
1568
1569`boolean` values
1570
1571## Calls
1572
1573- Description: Customise behaviour when participating in a call
1574- Setting: `calls`
1575- Default:
1576
1577```json
1578"calls": {
1579 // Join calls with the microphone live by default
1580 "mute_on_join": false,
1581 // Share your project when you are the first to join a channel
1582 "share_on_join": false
1583},
1584```
1585
1586## An example configuration:
1587
1588```json
1589// ~/.config/zed/settings.json
1590{
1591 "theme": "cave-light",
1592 "tab_size": 2,
1593 "preferred_line_length": 80,
1594 "soft_wrap": "none",
1595
1596 "buffer_font_size": 18,
1597 "buffer_font_family": "Zed Mono",
1598
1599 "autosave": "on_focus_change",
1600 "format_on_save": "off",
1601 "vim_mode": false,
1602 "projects_online_by_default": true,
1603 "terminal": {
1604 "font_family": "FiraCode Nerd Font Mono",
1605 "blinking": "off"
1606 },
1607 "languages": {
1608 "C": {
1609 "format_on_save": "language_server",
1610 "preferred_line_length": 64,
1611 "soft_wrap": "preferred_line_length"
1612 }
1613 }
1614}
1615```