1# Configuring Zed
2
3Zed is designed to be configured: we want to fit your workflow and preferences exactly. We provide default settings that are designed to be a comfortable starting point for as many people as possible, but we hope you will enjoy tweaking it to make it feel incredible.
4
5In addition to the settings described here, you may also want to change your [theme](./themes.md), configure your [key bindings](./key-bindings.md), set up [tasks](./tasks.md) or install [extensions](https://github.com/zed-industries/extensions).
6
7## Settings files
8
9<!--
10TBD: Settings files. Rewrite with "remote settings" in mind (e.g. `local settings` on the remote host).
11Consider renaming `zed: Open Local Settings` to `zed: Open Project Settings`.
12
13TBD: Add settings documentation about how settings are merged as overlays. E.g. project>local>default. Note how settings that are maps are merged, but settings that are arrays are replaced and must include the defaults.
14-->
15
16Your settings file can be opened with {#kb zed::OpenSettings}. By default it is located at `~/.config/zed/settings.json`, though if you have XDG_CONFIG_HOME in your environment on Linux it will be at `$XDG_CONFIG_HOME/zed/settings.json` instead.
17
18This configuration is merged with any local configuration inside your projects. You can open the project settings by running {#action zed::OpenProjectSettings} from the command palette. This will create a `.zed` directory containing`.zed/settings.json`.
19
20Although most projects will only need one settings file at the root, you can add more local settings files for subdirectories as needed. Not all settings can be set in local files, just those that impact the behavior of the editor and language tooling. For example you can set `tab_size`, `formatter` etc. but not `theme`, `vim_mode` and similar.
21
22The syntax for configuration files is a super-set of JSON that allows `//` comments.
23
24## Default settings
25
26You can find the default settings for your current Zed by running {#action zed::OpenDefaultSettings} from the command palette.
27
28Extensions that provide language servers may also provide default settings for those language servers.
29
30# Settings
31
32## Active Pane Modifiers
33
34- Description: Styling settings applied to the active pane.
35- Setting: `active_pane_modifiers`
36- Default:
37
38```json
39{
40 "active_pane_modifiers": {
41 "border_size": 0.0,
42 "inactive_opacity": 1.0
43 }
44}
45```
46
47### Border size
48
49- Description: Size of the border surrounding the active pane. When set to 0, the active pane doesn't have any border. The border is drawn inset.
50- Setting: `border_size`
51- Default: `0.0`
52
53**Options**
54
55Non-negative `float` values
56
57### Inactive Opacity
58
59- Description: Opacity of inactive panels. When set to 1.0, the inactive panes have the same opacity as the active one. If set to 0, the inactive panes content will not be visible at all. Values are clamped to the [0.0, 1.0] range.
60- Setting: `inactive_opacity`
61- Default: `1.0`
62
63**Options**
64
65`float` values
66
67## Bottom Dock Layout
68
69- Description: Control the layout of the bottom dock, relative to the left and right docks
70- Setting: `bottom_dock_layout`
71- Default: `"contained"`
72
73**Options**
74
751. Contain the bottom dock, giving the full height of the window to the left and right docks
76
77```json
78{
79 "bottom_dock_layout": "contained"
80}
81```
82
832. Give the bottom dock the full width of the window, truncating the left and right docks
84
85```json
86{
87 "bottom_dock_layout": "full"
88}
89```
90
913. Left align the bottom dock, truncating the left dock and giving the right dock the full height of the window
92
93```json
94{
95 "bottom_dock_layout": "left_aligned"
96}
97```
98
993. Right align the bottom dock, giving the left dock the full height of the window and truncating the right dock.
100
101```json
102{
103 "bottom_dock_layout": "right_aligned"
104}
105```
106
107## Auto Install extensions
108
109- Description: Define extensions to be autoinstalled or never be installed.
110- Setting: `auto_install_extension`
111- Default: `{ "html": true }`
112
113**Options**
114
115You can find the names of your currently installed extensions by listing the subfolders under the [extension installation location](./extensions/installing-extensions.md#installation-location):
116
117On MacOS:
118
119```sh
120ls ~/Library/Application\ Support/Zed/extensions/installed/
121```
122
123On Linux:
124
125```sh
126ls ~/.local/share/zed/extensions/installed
127```
128
129Define extensions which should be installed (`true`) or never installed (`false`).
130
131```json
132{
133 "auto_install_extensions": {
134 "html": true,
135 "dockerfile": true,
136 "docker-compose": false
137 }
138}
139```
140
141## Autosave
142
143- Description: When to automatically save edited buffers.
144- Setting: `autosave`
145- Default: `off`
146
147**Options**
148
1491. To disable autosave, set it to `off`:
150
151```json
152{
153 "autosave": "off"
154}
155```
156
1572. To autosave when focus changes, use `on_focus_change`:
158
159```json
160{
161 "autosave": "on_focus_change"
162}
163```
164
1653. To autosave when the active window changes, use `on_window_change`:
166
167```json
168{
169 "autosave": "on_window_change"
170}
171```
172
1734. To autosave after an inactivity period, use `after_delay`:
174
175```json
176{
177 "autosave": {
178 "after_delay": {
179 "milliseconds": 1000
180 }
181 }
182}
183```
184
185## Restore on Startup
186
187- Description: Controls session restoration on startup.
188- Setting: `restore_on_startup`
189- Default: `last_session`
190
191**Options**
192
1931. Restore all workspaces that were open when quitting Zed:
194
195```json
196{
197 "restore_on_startup": "last_session"
198}
199```
200
2012. Restore the workspace that was closed last:
202
203```json
204{
205 "restore_on_startup": "last_workspace"
206}
207```
208
2093. Always start with an empty editor:
210
211```json
212{
213 "restore_on_startup": "none"
214}
215```
216
217## Autoscroll on Clicks
218
219- Description: Whether to scroll when clicking near the edge of the visible text area.
220- Setting: `autoscroll_on_clicks`
221- Default: `false`
222
223**Options**
224
225`boolean` values
226
227## Auto Update
228
229- Description: Whether or not to automatically check for updates.
230- Setting: `auto_update`
231- Default: `true`
232
233**Options**
234
235`boolean` values
236
237## Base Keymap
238
239- Description: Base key bindings scheme. Base keymaps can be overridden with user keymaps.
240- Setting: `base_keymap`
241- Default: `VSCode`
242
243**Options**
244
2451. VSCode
246
247```json
248{
249 "base_keymap": "VSCode"
250}
251```
252
2532. Atom
254
255```json
256{
257 "base_keymap": "Atom"
258}
259```
260
2613. JetBrains
262
263```json
264{
265 "base_keymap": "JetBrains"
266}
267```
268
2694. None
270
271```json
272{
273 "base_keymap": "None"
274}
275```
276
2775. SublimeText
278
279```json
280{
281 "base_keymap": "SublimeText"
282}
283```
284
2856. TextMate
286
287```json
288{
289 "base_keymap": "TextMate"
290}
291```
292
293## Buffer Font Family
294
295- Description: The name of a font to use for rendering text in the editor.
296- Setting: `buffer_font_family`
297- Default: `Zed Plex Mono`
298
299**Options**
300
301The name of any font family installed on the user's system
302
303## Buffer Font Features
304
305- Description: The OpenType features to enable for text in the editor.
306- Setting: `buffer_font_features`
307- Default: `null`
308- Platform: macOS and Windows.
309
310**Options**
311
312Zed supports all OpenType features that can be enabled or disabled for a given buffer or terminal font, as well as setting values for font features.
313
314For example, to disable font ligatures, add the following to your settings:
315
316```json
317{
318 "buffer_font_features": {
319 "calt": false
320 }
321}
322```
323
324You can also set other OpenType features, like setting `cv01` to `7`:
325
326```json
327{
328 "buffer_font_features": {
329 "cv01": 7
330 }
331}
332```
333
334## Buffer Font Fallbacks
335
336- Description: Set the buffer text's font fallbacks, this will be merged with the platform's default fallbacks.
337- Setting: `buffer_font_fallbacks`
338- Default: `null`
339- Platform: macOS and Windows.
340
341**Options**
342
343For example, to use `Nerd Font` as a fallback, add the following to your settings:
344
345```json
346{
347 "buffer_font_fallbacks": ["Nerd Font"]
348}
349```
350
351## Buffer Font Size
352
353- Description: The default font size for text in the editor.
354- Setting: `buffer_font_size`
355- Default: `15`
356
357**Options**
358
359`integer` values from `6` to `100` pixels (inclusive)
360
361## Buffer Font Weight
362
363- Description: The default font weight for text in the editor.
364- Setting: `buffer_font_weight`
365- Default: `400`
366
367**Options**
368
369`integer` values between `100` and `900`
370
371## Buffer Line Height
372
373- Description: The default line height for text in the editor.
374- Setting: `buffer_line_height`
375- Default: `"comfortable"`
376
377**Options**
378
379`"standard"`, `"comfortable"` or `{ "custom": float }` (`1` is compact, `2` is loose)
380
381## Close on File Delete
382
383- Description: Whether to automatically close editor tabs when their corresponding files are deleted from disk.
384- Setting: `close_on_file_delete`
385- Default: `false`
386
387**Options**
388
389`boolean` values
390
391When enabled, this setting will automatically close tabs for files that have been deleted from the file system. This is particularly useful for workflows involving temporary or scratch files that are frequently created and deleted. When disabled (default), deleted files remain open with a strikethrough through their tab title.
392
393Note: Dirty files (files with unsaved changes) will not be automatically closed even when this setting is enabled, ensuring you don't lose unsaved work.
394
395## Confirm Quit
396
397- Description: Whether or not to prompt the user to confirm before closing the application.
398- Setting: `confirm_quit`
399- Default: `false`
400
401**Options**
402
403`boolean` values
404
405## Centered Layout
406
407- Description: Configuration for the centered layout mode.
408- Setting: `centered_layout`
409- Default:
410
411```json
412"centered_layout": {
413 "left_padding": 0.2,
414 "right_padding": 0.2,
415}
416```
417
418**Options**
419
420The `left_padding` and `right_padding` options define the relative width of the
421left 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`.
422
423## Direnv Integration
424
425- Description: Settings for [direnv](https://direnv.net/) integration. Requires `direnv` to be installed.
426 `direnv` integration make it possible to use the environment variables set by a `direnv` configuration to detect some language servers in `$PATH` instead of installing them.
427 It also allows for those environment variables to be used in tasks.
428- Setting: `load_direnv`
429- Default: `"direct"`
430
431**Options**
432
433There are two options to choose from:
434
4351. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
4362. `direct`: Use `direnv export json` to load direnv. This will load direnv directly without relying on the shell hook and might cause some inconsistencies. This allows direnv to work with any shell.
437
438## Edit Predictions
439
440- Description: Settings for edit predictions.
441- Setting: `edit_predictions`
442- Default:
443
444```json
445 "edit_predictions": {
446 "disabled_globs": [
447 "**/.env*",
448 "**/*.pem",
449 "**/*.key",
450 "**/*.cert",
451 "**/*.crt",
452 "**/.dev.vars",
453 "**/secrets.yml"
454 ]
455 }
456```
457
458**Options**
459
460### Disabled Globs
461
462- Description: A list of globs for which edit predictions should be disabled for. This list adds to a pre-existing, sensible default set of globs. Any additional ones you add are combined with them.
463- Setting: `disabled_globs`
464- Default: `["**/.env*", "**/*.pem", "**/*.key", "**/*.cert", "**/*.crt", "**/.dev.vars", "**/secrets.yml"]`
465
466**Options**
467
468List of `string` values.
469
470## Edit Predictions Disabled in
471
472- Description: A list of language scopes in which edit predictions should be disabled.
473- Setting: `edit_predictions_disabled_in`
474- Default: `[]`
475
476**Options**
477
478List of `string` values
479
4801. Don't show edit predictions in comments:
481
482```json
483"disabled_in": ["comment"]
484```
485
4862. Don't show edit predictions in strings and comments:
487
488```json
489"disabled_in": ["comment", "string"]
490```
491
4923. Only in Go, don't show edit predictions in strings and comments:
493
494```json
495{
496 "languages": {
497 "Go": {
498 "edit_predictions_disabled_in": ["comment", "string"]
499 }
500 }
501}
502```
503
504## Current Line Highlight
505
506- Description: How to highlight the current line in the editor.
507- Setting: `current_line_highlight`
508- Default: `all`
509
510**Options**
511
5121. Don't highlight the current line:
513
514```json
515"current_line_highlight": "none"
516```
517
5182. Highlight the gutter area:
519
520```json
521"current_line_highlight": "gutter"
522```
523
5243. Highlight the editor area:
525
526```json
527"current_line_highlight": "line"
528```
529
5304. Highlight the full line:
531
532```json
533"current_line_highlight": "all"
534```
535
536## Selection Highlight
537
538- Description: Whether to highlight all occurrences of the selected text in an editor.
539- Setting: `selection_highlight`
540- Default: `true`
541
542## LSP Highlight Debounce
543
544- Description: The debounce delay before querying highlights from the language server based on the current cursor location.
545- Setting: `lsp_highlight_debounce`
546- Default: `75`
547
548## Cursor Blink
549
550- Description: Whether or not the cursor blinks.
551- Setting: `cursor_blink`
552- Default: `true`
553
554**Options**
555
556`boolean` values
557
558## Cursor Shape
559
560- Description: Cursor shape for the default editor.
561- Setting: `cursor_shape`
562- Default: `bar`
563
564**Options**
565
5661. A vertical bar:
567
568```json
569"cursor_shape": "bar"
570```
571
5722. A block that surrounds the following character:
573
574```json
575"cursor_shape": "block"
576```
577
5783. An underline / underscore that runs along the following character:
579
580```json
581"cursor_shape": "underline"
582```
583
5844. An box drawn around the following character:
585
586```json
587"cursor_shape": "hollow"
588```
589
590## Hide Mouse
591
592- Description: Determines when the mouse cursor should be hidden in an editor or input box.
593- Setting: `hide_mouse`
594- Default: `on_typing_and_movement`
595
596**Options**
597
5981. Never hide the mouse cursor:
599
600```json
601"hide_mouse": "never"
602```
603
6042. Hide only when typing:
605
606```json
607"hide_mouse": "on_typing"
608```
609
6103. Hide on both typing and cursor movement:
611
612```json
613"hide_mouse": "on_typing_and_movement"
614```
615
616## Snippet Sort Order
617
618- Description: Determines how snippets are sorted relative to other completion items.
619- Setting: `snippet_sort_order`
620- Default: `inline`
621
622**Options**
623
6241. Place snippets at the top of the completion list:
625
626```json
627"snippet_sort_order": "top"
628```
629
6302. Place snippets normally without any preference:
631
632```json
633"snippet_sort_order": "inline"
634```
635
6363. Place snippets at the bottom of the completion list:
637
638```json
639"snippet_sort_order": "bottom"
640```
641
642## Editor Scrollbar
643
644- Description: Whether or not to show the editor scrollbar and various elements in it.
645- Setting: `scrollbar`
646- Default:
647
648```json
649"scrollbar": {
650 "show": "auto",
651 "cursors": true,
652 "git_diff": true,
653 "search_results": true,
654 "selected_text": true,
655 "selected_symbol": true,
656 "diagnostics": "all",
657 "axes": {
658 "horizontal": true,
659 "vertical": true,
660 },
661},
662```
663
664### Show Mode
665
666- Description: When to show the editor scrollbar.
667- Setting: `show`
668- Default: `auto`
669
670**Options**
671
6721. Show the scrollbar if there's important information or follow the system's configured behavior:
673
674```json
675"scrollbar": {
676 "show": "auto"
677}
678```
679
6802. Match the system's configured behavior:
681
682```json
683"scrollbar": {
684 "show": "system"
685}
686```
687
6883. Always show the scrollbar:
689
690```json
691"scrollbar": {
692 "show": "always"
693}
694```
695
6964. Never show the scrollbar:
697
698```json
699"scrollbar": {
700 "show": "never"
701}
702```
703
704### Cursor Indicators
705
706- Description: Whether to show cursor positions in the scrollbar.
707- Setting: `cursors`
708- Default: `true`
709
710**Options**
711
712`boolean` values
713
714### Git Diff Indicators
715
716- Description: Whether to show git diff indicators in the scrollbar.
717- Setting: `git_diff`
718- Default: `true`
719
720**Options**
721
722`boolean` values
723
724### Search Results Indicators
725
726- Description: Whether to show buffer search results in the scrollbar.
727- Setting: `search_results`
728- Default: `true`
729
730**Options**
731
732`boolean` values
733
734### Selected Text Indicators
735
736- Description: Whether to show selected text occurrences in the scrollbar.
737- Setting: `selected_text`
738- Default: `true`
739
740**Options**
741
742`boolean` values
743
744### Selected Symbols Indicators
745
746- Description: Whether to show selected symbol occurrences in the scrollbar.
747- Setting: `selected_symbol`
748- Default: `true`
749
750**Options**
751
752`boolean` values
753
754### Diagnostics
755
756- Description: Which diagnostic indicators to show in the scrollbar.
757- Setting: `diagnostics`
758- Default: `all`
759
760**Options**
761
7621. Show all diagnostics:
763
764```json
765{
766 "diagnostics": "all"
767}
768```
769
7702. Do not show any diagnostics:
771
772```json
773{
774 "diagnostics": "none"
775}
776```
777
7783. Show only errors:
779
780```json
781{
782 "diagnostics": "error"
783}
784```
785
7864. Show only errors and warnings:
787
788```json
789{
790 "diagnostics": "warning"
791}
792```
793
7945. Show only errors, warnings, and information:
795
796```json
797{
798 "diagnostics": "information"
799}
800```
801
802### Axes
803
804- Description: Forcefully enable or disable the scrollbar for each axis
805- Setting: `axes`
806- Default:
807
808```json
809"scrollbar": {
810 "axes": {
811 "horizontal": true,
812 "vertical": true,
813 },
814}
815```
816
817#### Horizontal
818
819- Description: When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
820- Setting: `horizontal`
821- Default: `true`
822
823**Options**
824
825`boolean` values
826
827#### Vertical
828
829- Description: When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
830- Setting: `vertical`
831- Default: `true`
832
833**Options**
834
835`boolean` values
836
837## Minimap
838
839- Description: Settings related to the editor's minimap, which provides an overview of your document.
840- Setting: `minimap`
841- Default:
842
843```json
844{
845 "minimap": {
846 "show": "never",
847 "thumb": "always",
848 "thumb_border": "left_open",
849 "current_line_highlight": null
850 }
851}
852```
853
854### Show Mode
855
856- Description: When to show the minimap in the editor.
857- Setting: `show`
858- Default: `never`
859
860**Options**
861
8621. Always show the minimap:
863
864```json
865{
866 "show": "always"
867}
868```
869
8702. Show the minimap if the editor's scrollbars are visible:
871
872```json
873{
874 "show": "auto"
875}
876```
877
8783. Never show the minimap:
879
880```json
881{
882 "show": "never"
883}
884```
885
886### Thumb Display
887
888- Description: When to show the minimap thumb (the visible editor area) in the minimap.
889- Setting: `thumb`
890- Default: `always`
891
892**Options**
893
8941. Show the minimap thumb when hovering over the minimap:
895
896```json
897{
898 "thumb": "hover"
899}
900```
901
9022. Always show the minimap thumb:
903
904```json
905{
906 "thumb": "always"
907}
908```
909
910### Thumb Border
911
912- Description: How the minimap thumb border should look.
913- Setting: `thumb_border`
914- Default: `left_open`
915
916**Options**
917
9181. Display a border on all sides of the thumb:
919
920```json
921{
922 "thumb_border": "full"
923}
924```
925
9262. Display a border on all sides except the left side:
927
928```json
929{
930 "thumb_border": "left_open"
931}
932```
933
9343. Display a border on all sides except the right side:
935
936```json
937{
938 "thumb_border": "right_open"
939}
940```
941
9424. Display a border only on the left side:
943
944```json
945{
946 "thumb_border": "left_only"
947}
948```
949
9505. Display the thumb without any border:
951
952```json
953{
954 "thumb_border": "none"
955}
956```
957
958### Current Line Highlight
959
960- Description: How to highlight the current line in the minimap.
961- Setting: `current_line_highlight`
962- Default: `null`
963
964**Options**
965
9661. Inherit the editor's current line highlight setting:
967
968```json
969{
970 "minimap": {
971 "current_line_highlight": null
972 }
973}
974```
975
9762. Highlight the current line in the minimap:
977
978```json
979{
980 "minimap": {
981 "current_line_highlight": "line"
982 }
983}
984```
985
986or
987
988```json
989{
990 "minimap": {
991 "current_line_highlight": "all"
992 }
993}
994```
995
9963. Do not highlight the current line in the minimap:
997
998```json
999{
1000 "minimap": {
1001 "current_line_highlight": "gutter"
1002 }
1003}
1004```
1005
1006or
1007
1008```json
1009{
1010 "minimap": {
1011 "current_line_highlight": "none"
1012 }
1013}
1014```
1015
1016## Editor Tab Bar
1017
1018- Description: Settings related to the editor's tab bar.
1019- Settings: `tab_bar`
1020- Default:
1021
1022```json
1023"tab_bar": {
1024 "show": true,
1025 "show_nav_history_buttons": true,
1026 "show_tab_bar_buttons": true
1027}
1028```
1029
1030### Show
1031
1032- Description: Whether or not to show the tab bar in the editor.
1033- Setting: `show`
1034- Default: `true`
1035
1036**Options**
1037
1038`boolean` values
1039
1040### Navigation History Buttons
1041
1042- Description: Whether or not to show the navigation history buttons.
1043- Setting: `show_nav_history_buttons`
1044- Default: `true`
1045
1046**Options**
1047
1048`boolean` values
1049
1050### Tab Bar Buttons
1051
1052- Description: Whether or not to show the tab bar buttons.
1053- Setting: `show_tab_bar_buttons`
1054- Default: `true`
1055
1056**Options**
1057
1058`boolean` values
1059
1060## Editor Tabs
1061
1062- Description: Configuration for the editor tabs.
1063- Setting: `tabs`
1064- Default:
1065
1066```json
1067"tabs": {
1068 "close_position": "right",
1069 "file_icons": false,
1070 "git_status": false,
1071 "activate_on_close": "history",
1072 "show_close_button": "hover",
1073 "show_diagnostics": "off"
1074},
1075```
1076
1077### Close Position
1078
1079- Description: Where to display close button within a tab.
1080- Setting: `close_position`
1081- Default: `right`
1082
1083**Options**
1084
10851. Display the close button on the right:
1086
1087```json
1088{
1089 "close_position": "right"
1090}
1091```
1092
10932. Display the close button on the left:
1094
1095```json
1096{
1097 "close_position": "left"
1098}
1099```
1100
1101### File Icons
1102
1103- Description: Whether to show the file icon for a tab.
1104- Setting: `file_icons`
1105- Default: `false`
1106
1107### Git Status
1108
1109- Description: Whether or not to show Git file status in tab.
1110- Setting: `git_status`
1111- Default: `false`
1112
1113### Activate on close
1114
1115- Description: What to do after closing the current tab.
1116- Setting: `activate_on_close`
1117- Default: `history`
1118
1119**Options**
1120
11211. Activate the tab that was open previously:
1122
1123```json
1124{
1125 "activate_on_close": "history"
1126}
1127```
1128
11292. Activate the right neighbour tab if present:
1130
1131```json
1132{
1133 "activate_on_close": "neighbour"
1134}
1135```
1136
11373. Activate the left neighbour tab if present:
1138
1139```json
1140{
1141 "activate_on_close": "left_neighbour"
1142}
1143```
1144
1145### Show close button
1146
1147- Description: Controls the appearance behavior of the tab's close button.
1148- Setting: `show_close_button`
1149- Default: `hover`
1150
1151**Options**
1152
11531. Show it just upon hovering the tab:
1154
1155```json
1156{
1157 "show_close_button": "hover"
1158}
1159```
1160
11612. Show it persistently:
1162
1163```json
1164{
1165 "show_close_button": "always"
1166}
1167```
1168
11693. Never show it, even if hovering it:
1170
1171```json
1172{
1173 "show_close_button": "hidden"
1174}
1175```
1176
1177### Show Diagnostics
1178
1179- Description: Whether to show diagnostics indicators in tabs. This setting only works when file icons are active and controls which files with diagnostic issues to mark.
1180- Setting: `show_diagnostics`
1181- Default: `off`
1182
1183**Options**
1184
11851. Do not mark any files:
1186
1187```json
1188{
1189 "show_diagnostics": "off"
1190}
1191```
1192
11932. Only mark files with errors:
1194
1195```json
1196{
1197 "show_diagnostics": "errors"
1198}
1199```
1200
12013. Mark files with errors and warnings:
1202
1203```json
1204{
1205 "show_diagnostics": "all"
1206}
1207```
1208
1209### Show Inline Code Actions
1210
1211- Description: Whether to show code action button at start of buffer line.
1212- Setting: `inline_code_actions`
1213- Default: `true`
1214
1215**Options**
1216
1217`boolean` values
1218
1219### Drag And Drop Selection
1220
1221- Description: Whether to allow drag and drop text selection in buffer. `delay` is the milliseconds that must elapse before drag and drop is allowed. Otherwise, a new text selection is created.
1222- Setting: `drag_and_drop_selection`
1223- Default:
1224
1225```json
1226"drag_and_drop_selection": {
1227 "enabled": true,
1228 "delay": 300
1229}
1230```
1231
1232## Editor Toolbar
1233
1234- Description: Whether or not to show various elements in the editor toolbar.
1235- Setting: `toolbar`
1236- Default:
1237
1238```json
1239"toolbar": {
1240 "breadcrumbs": true,
1241 "quick_actions": true,
1242 "selections_menu": true,
1243 "agent_review": true,
1244 "code_actions": false
1245},
1246```
1247
1248**Options**
1249
1250Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
1251
1252## Enable Language Server
1253
1254- Description: Whether or not to use language servers to provide code intelligence.
1255- Setting: `enable_language_server`
1256- Default: `true`
1257
1258**Options**
1259
1260`boolean` values
1261
1262## Ensure Final Newline On Save
1263
1264- Description: Removes any lines containing only whitespace at the end of the file and ensures just one newline at the end.
1265- Setting: `ensure_final_newline_on_save`
1266- Default: `true`
1267
1268**Options**
1269
1270`boolean` values
1271
1272## LSP
1273
1274- Description: Configuration for language servers.
1275- Setting: `lsp`
1276- Default: `null`
1277
1278**Options**
1279
1280The following settings can be overridden for specific language servers:
1281
1282- `initialization_options`
1283- `settings`
1284
1285To override configuration for a language server, add an entry for that language server's name to the `lsp` value.
1286
1287Some options are passed via `initialization_options` to the language server. These are for options which must be specified at language server startup and when changed will require restarting the language server.
1288
1289For example to pass the `check` option to `rust-analyzer`, use the following configuration:
1290
1291```json
1292"lsp": {
1293 "rust-analyzer": {
1294 "initialization_options": {
1295 "check": {
1296 "command": "clippy" // rust-analyzer.check.command (default: "check")
1297 }
1298 }
1299 }
1300}
1301```
1302
1303While other options may be changed at a runtime and should be placed under `settings`:
1304
1305```json
1306"lsp": {
1307 "yaml-language-server": {
1308 "settings": {
1309 "yaml": {
1310 "keyOrdering": true // Enforces alphabetical ordering of keys in maps
1311 }
1312 }
1313 }
1314}
1315```
1316
1317## LSP Highlight Debounce
1318
1319- Description: The debounce delay in milliseconds before querying highlights from the language server based on the current cursor location.
1320- Setting: `lsp_highlight_debounce`
1321- Default: `75`
1322
1323**Options**
1324
1325`integer` values representing milliseconds
1326
1327## Format On Save
1328
1329- Description: Whether or not to perform a buffer format before saving.
1330- Setting: `format_on_save`
1331- Default: `on`
1332
1333**Options**
1334
13351. `on`, enables format on save obeying `formatter` setting:
1336
1337```json
1338{
1339 "format_on_save": "on"
1340}
1341```
1342
13432. `off`, disables format on save:
1344
1345```json
1346{
1347 "format_on_save": "off"
1348}
1349```
1350
1351## Formatter
1352
1353- Description: How to perform a buffer format.
1354- Setting: `formatter`
1355- Default: `auto`
1356
1357**Options**
1358
13591. To use the current language server, use `"language_server"`:
1360
1361```json
1362{
1363 "formatter": "language_server"
1364}
1365```
1366
13672. 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):
1368
1369```json
1370{
1371 "formatter": {
1372 "external": {
1373 "command": "sed",
1374 "arguments": ["-e", "s/ *$//"]
1375 }
1376 }
1377}
1378```
1379
13803. External formatters may optionally include a `{buffer_path}` placeholder which at runtime will include the path of the buffer being formatted. Formatters operate by receiving file content via standard input, reformatting it and then outputting it to standard output and so normally don't know the filename of what they are formatting. Tools like Prettier support receiving the file path via a command line argument which can then used to impact formatting decisions.
1381
1382WARNING: `{buffer_path}` should not be used to direct your formatter to read from a filename. Your formatter should only read from standard input and should not read or write files directly.
1383
1384```json
1385 "formatter": {
1386 "external": {
1387 "command": "prettier",
1388 "arguments": ["--stdin-filepath", "{buffer_path}"]
1389 }
1390 }
1391```
1392
13934. Or to use code actions provided by the connected language servers, use `"code_actions"`:
1394
1395```json
1396{
1397 "formatter": {
1398 "code_actions": {
1399 // Use ESLint's --fix:
1400 "source.fixAll.eslint": true,
1401 // Organize imports on save:
1402 "source.organizeImports": true
1403 }
1404 }
1405}
1406```
1407
14085. Or to use multiple formatters consecutively, use an array of formatters:
1409
1410```json
1411{
1412 "formatter": [
1413 { "language_server": { "name": "rust-analyzer" } },
1414 {
1415 "external": {
1416 "command": "sed",
1417 "arguments": ["-e", "s/ *$//"]
1418 }
1419 }
1420 ]
1421}
1422```
1423
1424Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
1425If any of the formatters fails, the subsequent ones will still be executed.
1426
1427## Code Actions On Format
1428
1429- Description: The code actions to perform with the primary language server when formatting the buffer.
1430- Setting: `code_actions_on_format`
1431- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
1432
1433**Examples**
1434
1435<!--
1436TBD: Add Python Ruff source.organizeImports example
1437-->
1438
14391. Organize imports on format in TypeScript and TSX buffers:
1440
1441```json
1442{
1443 "languages": {
1444 "TypeScript": {
1445 "code_actions_on_format": {
1446 "source.organizeImports": true
1447 }
1448 },
1449 "TSX": {
1450 "code_actions_on_format": {
1451 "source.organizeImports": true
1452 }
1453 }
1454 }
1455}
1456```
1457
14582. Run ESLint `fixAll` code action when formatting:
1459
1460```json
1461{
1462 "languages": {
1463 "JavaScript": {
1464 "code_actions_on_format": {
1465 "source.fixAll.eslint": true
1466 }
1467 }
1468 }
1469}
1470```
1471
14723. Run only a single ESLint rule when using `fixAll`:
1473
1474```json
1475{
1476 "languages": {
1477 "JavaScript": {
1478 "code_actions_on_format": {
1479 "source.fixAll.eslint": true
1480 }
1481 }
1482 },
1483 "lsp": {
1484 "eslint": {
1485 "settings": {
1486 "codeActionOnSave": {
1487 "rules": ["import/order"]
1488 }
1489 }
1490 }
1491 }
1492}
1493```
1494
1495## Auto close
1496
1497- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
1498- Setting: `use_autoclose`
1499- Default: `true`
1500
1501**Options**
1502
1503`boolean` values
1504
1505## Always Treat Brackets As Autoclosed
1506
1507- Description: Controls how the editor handles the autoclosed characters.
1508- Setting: `always_treat_brackets_as_autoclosed`
1509- Default: `false`
1510
1511**Options**
1512
1513`boolean` values
1514
1515**Example**
1516
1517If the setting is set to `true`:
1518
15191. Enter in the editor: `)))`
15202. Move the cursor to the start: `^)))`
15213. Enter again: `)))`
1522
1523The result is still `)))` and not `))))))`, which is what it would be by default.
1524
1525## File Scan Exclusions
1526
1527- Setting: `file_scan_exclusions`
1528- Description: Files or globs of files that will be excluded by Zed entirely. They will be skipped during file scans, file searches, and not be displayed in the project file tree. Overrides `file_scan_inclusions`.
1529- Default:
1530
1531```json
1532"file_scan_exclusions": [
1533 "**/.git",
1534 "**/.svn",
1535 "**/.hg",
1536 "**/.jj",
1537 "**/CVS",
1538 "**/.DS_Store",
1539 "**/Thumbs.db",
1540 "**/.classpath",
1541 "**/.settings"
1542],
1543```
1544
1545Note, specifying `file_scan_exclusions` in settings.json will override the defaults (shown above). If you are looking to exclude additional items you will need to include all the default values in your settings.
1546
1547## File Scan Inclusions
1548
1549- Setting: `file_scan_inclusions`
1550- Description: Files or globs of files that will be included by Zed, even when ignored by git. This is useful for files that are not tracked by git, but are still important to your project. Note that globs that are overly broad can slow down Zed's file scanning. `file_scan_exclusions` takes precedence over these inclusions.
1551- Default:
1552
1553```json
1554"file_scan_inclusions": [".env*"],
1555```
1556
1557## File Types
1558
1559- Setting: `file_types`
1560- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
1561- Default:
1562
1563```json
1564"file_types": {
1565 "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
1566 "Shell Script": [".env.*"]
1567}
1568```
1569
1570**Examples**
1571
1572To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
1573
1574```json
1575{
1576 "file_types": {
1577 "C++": ["c"],
1578 "TOML": ["MyLockFile"],
1579 "Dockerfile": ["Dockerfile*"]
1580 }
1581}
1582```
1583
1584## Diagnostics
1585
1586- Description: Configuration for diagnostics-related features.
1587- Setting: `diagnostics`
1588- Default:
1589
1590```json
1591{
1592 "diagnostics": {
1593 "include_warnings": true,
1594 "inline": {
1595 "enabled": false
1596 },
1597 "update_with_cursor": false,
1598 "primary_only": false,
1599 "use_rendered": false
1600 }
1601}
1602```
1603
1604### Inline Diagnostics
1605
1606- Description: Whether or not to show diagnostics information inline.
1607- Setting: `inline`
1608- Default:
1609
1610```json
1611{
1612 "diagnostics": {
1613 "inline": {
1614 "enabled": false,
1615 "update_debounce_ms": 150,
1616 "padding": 4,
1617 "min_column": 0,
1618 "max_severity": null
1619 }
1620 }
1621}
1622```
1623
1624**Options**
1625
16261. Enable inline diagnostics.
1627
1628```json
1629{
1630 "diagnostics": {
1631 "inline": {
1632 "enabled": true
1633 }
1634 }
1635}
1636```
1637
16382. Delay diagnostic updates until some time after the last diagnostic update.
1639
1640```json
1641{
1642 "diagnostics": {
1643 "inline": {
1644 "enabled": true,
1645 "update_debounce_ms": 150
1646 }
1647 }
1648}
1649```
1650
16513. Set padding between the end of the source line and the start of the diagnostic.
1652
1653```json
1654{
1655 "diagnostics": {
1656 "inline": {
1657 "enabled": true,
1658 "padding": 4
1659 }
1660 }
1661}
1662```
1663
16644. Horizontally align inline diagnostics at the given column.
1665
1666```json
1667{
1668 "diagnostics": {
1669 "inline": {
1670 "enabled": true,
1671 "min_column": 80
1672 }
1673 }
1674}
1675```
1676
16775. Show only warning and error diagnostics.
1678
1679```json
1680{
1681 "diagnostics": {
1682 "inline": {
1683 "enabled": true,
1684 "max_severity": "warning"
1685 }
1686 }
1687}
1688```
1689
1690## Git
1691
1692- Description: Configuration for git-related features.
1693- Setting: `git`
1694- Default:
1695
1696```json
1697{
1698 "git": {
1699 "git_gutter": "tracked_files",
1700 "inline_blame": {
1701 "enabled": true
1702 },
1703 "hunk_style": "staged_hollow"
1704 }
1705}
1706```
1707
1708### Git Gutter
1709
1710- Description: Whether or not to show the git gutter.
1711- Setting: `git_gutter`
1712- Default: `tracked_files`
1713
1714**Options**
1715
17161. Show git gutter in tracked files
1717
1718```json
1719{
1720 "git": {
1721 "git_gutter": "tracked_files"
1722 }
1723}
1724```
1725
17262. Hide git gutter
1727
1728```json
1729{
1730 "git": {
1731 "git_gutter": "hide"
1732 }
1733}
1734```
1735
1736### Gutter Debounce
1737
1738- Description: Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
1739- Setting: `gutter_debounce`
1740- Default: `null`
1741
1742**Options**
1743
1744`integer` values representing milliseconds
1745
1746Example:
1747
1748```json
1749{
1750 "git": {
1751 "gutter_debounce": 100
1752 }
1753}
1754```
1755
1756### Inline Git Blame
1757
1758- Description: Whether or not to show git blame information inline, on the currently focused line.
1759- Setting: `inline_blame`
1760- Default:
1761
1762```json
1763{
1764 "git": {
1765 "inline_blame": {
1766 "enabled": true
1767 }
1768 }
1769}
1770```
1771
1772**Options**
1773
17741. Disable inline git blame:
1775
1776```json
1777{
1778 "git": {
1779 "inline_blame": {
1780 "enabled": false
1781 }
1782 }
1783}
1784```
1785
17862. Only show inline git blame after a delay (that starts after cursor stops moving):
1787
1788```json
1789{
1790 "git": {
1791 "inline_blame": {
1792 "enabled": true,
1793 "delay_ms": 500
1794 }
1795 }
1796}
1797```
1798
17993. Show a commit summary next to the commit date and author:
1800
1801```json
1802{
1803 "git": {
1804 "inline_blame": {
1805 "enabled": true,
1806 "show_commit_summary": true
1807 }
1808 }
1809}
1810```
1811
18124. Use this as the minimum column at which to display inline blame information:
1813
1814```json
1815{
1816 "git": {
1817 "inline_blame": {
1818 "enabled": true,
1819 "min_column": 80
1820 }
1821 }
1822}
1823```
1824
1825### Hunk Style
1826
1827- Description: What styling we should use for the diff hunks.
1828- Setting: `hunk_style`
1829- Default:
1830
1831```json
1832{
1833 "git": {
1834 "hunk_style": "staged_hollow"
1835 }
1836}
1837```
1838
1839**Options**
1840
18411. Show the staged hunks faded out and with a border:
1842
1843```json
1844{
1845 "git": {
1846 "hunk_style": "staged_hollow"
1847 }
1848}
1849```
1850
18512. Show unstaged hunks faded out and with a border:
1852
1853```json
1854{
1855 "git": {
1856 "hunk_style": "unstaged_hollow"
1857 }
1858}
1859```
1860
1861## Indent Guides
1862
1863- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1864- Setting: `indent_guides`
1865- Default:
1866
1867```json
1868{
1869 "indent_guides": {
1870 "enabled": true,
1871 "line_width": 1,
1872 "active_line_width": 1,
1873 "coloring": "fixed",
1874 "background_coloring": "disabled"
1875 }
1876}
1877```
1878
1879**Options**
1880
18811. Disable indent guides
1882
1883```json
1884{
1885 "indent_guides": {
1886 "enabled": false
1887 }
1888}
1889```
1890
18912. Enable indent guides for a specific language.
1892
1893```json
1894{
1895 "languages": {
1896 "Python": {
1897 "indent_guides": {
1898 "enabled": true
1899 }
1900 }
1901 }
1902}
1903```
1904
19053. Enable indent aware coloring ("rainbow indentation").
1906 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.
1907
1908```json
1909{
1910 "indent_guides": {
1911 "enabled": true,
1912 "coloring": "indent_aware"
1913 }
1914}
1915```
1916
19174. Enable indent aware background coloring ("rainbow indentation").
1918 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.
1919
1920```json
1921{
1922 "indent_guides": {
1923 "enabled": true,
1924 "coloring": "indent_aware",
1925 "background_coloring": "indent_aware"
1926 }
1927}
1928```
1929
1930## Hard Tabs
1931
1932- Description: Whether to indent lines using tab characters or multiple spaces.
1933- Setting: `hard_tabs`
1934- Default: `false`
1935
1936**Options**
1937
1938`boolean` values
1939
1940## Multi Cursor Modifier
1941
1942- Description: Determines the modifier to be used to add multiple cursors with the mouse. The open hover link mouse gestures will adapt such that it do not conflict with the multicursor modifier.
1943- Setting: `multi_cursor_modifier`
1944- Default: `alt`
1945
1946**Options**
1947
19481. Maps to `Alt` on Linux and Windows and to `Option` on MacOS:
1949
1950```json
1951{
1952 "multi_cursor_modifier": "alt"
1953}
1954```
1955
19562. Maps `Control` on Linux and Windows and to `Command` on MacOS:
1957
1958```json
1959{
1960 "multi_cursor_modifier": "cmd_or_ctrl" // alias: "cmd", "ctrl"
1961}
1962```
1963
1964## Hover Popover Enabled
1965
1966- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1967- Setting: `hover_popover_enabled`
1968- Default: `true`
1969
1970**Options**
1971
1972`boolean` values
1973
1974## Hover Popover Delay
1975
1976- Description: Time to wait in milliseconds before showing the informational hover box.
1977- Setting: `hover_popover_delay`
1978- Default: `300`
1979
1980**Options**
1981
1982`integer` values representing milliseconds
1983
1984## Icon Theme
1985
1986- Description: The icon theme setting can be specified in two forms - either as the name of an icon theme or as an object containing the `mode`, `dark`, and `light` icon themes for files/folders inside Zed.
1987- Setting: `icon_theme`
1988- Default: `Zed (Default)`
1989
1990### Icon Theme Object
1991
1992- Description: Specify the icon theme using an object that includes the `mode`, `dark`, and `light`.
1993- Setting: `icon_theme`
1994- Default:
1995
1996```json
1997"icon_theme": {
1998 "mode": "system",
1999 "dark": "Zed (Default)",
2000 "light": "Zed (Default)"
2001},
2002```
2003
2004### Mode
2005
2006- Description: Specify the icon theme mode.
2007- Setting: `mode`
2008- Default: `system`
2009
2010**Options**
2011
20121. Set the icon theme to dark mode
2013
2014```json
2015{
2016 "mode": "dark"
2017}
2018```
2019
20202. Set the icon theme to light mode
2021
2022```json
2023{
2024 "mode": "light"
2025}
2026```
2027
20283. Set the icon theme to system mode
2029
2030```json
2031{
2032 "mode": "system"
2033}
2034```
2035
2036### Dark
2037
2038- Description: The name of the dark icon theme.
2039- Setting: `dark`
2040- Default: `Zed (Default)`
2041
2042**Options**
2043
2044Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
2045
2046### Light
2047
2048- Description: The name of the light icon theme.
2049- Setting: `light`
2050- Default: `Zed (Default)`
2051
2052**Options**
2053
2054Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
2055
2056## Inlay hints
2057
2058- Description: Configuration for displaying extra text with hints in the editor.
2059- Setting: `inlay_hints`
2060- Default:
2061
2062```json
2063"inlay_hints": {
2064 "enabled": false,
2065 "show_type_hints": true,
2066 "show_parameter_hints": true,
2067 "show_other_hints": true,
2068 "show_background": false,
2069 "edit_debounce_ms": 700,
2070 "scroll_debounce_ms": 50,
2071 "toggle_on_modifiers_press": null
2072}
2073```
2074
2075**Options**
2076
2077Inlay hints querying consists of two parts: editor (client) and LSP server.
2078With 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.
2079At 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.
2080
2081The following languages have inlay hints preconfigured by Zed:
2082
2083- [Go](https://docs.zed.dev/languages/go)
2084- [Rust](https://docs.zed.dev/languages/rust)
2085- [Svelte](https://docs.zed.dev/languages/svelte)
2086- [Typescript](https://docs.zed.dev/languages/typescript)
2087
2088Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
2089
2090Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
2091Settings-related hint updates are not debounced.
2092
2093All possible config values for `toggle_on_modifiers_press` are:
2094
2095```json
2096"inlay_hints": {
2097 "toggle_on_modifiers_press": {
2098 "control": true,
2099 "shift": true,
2100 "alt": true,
2101 "platform": true,
2102 "function": true
2103 }
2104}
2105```
2106
2107Unspecified values have a `false` value, hints won't be toggled if all the modifiers are `false` or not all the modifiers are pressed.
2108
2109## Journal
2110
2111- Description: Configuration for the journal.
2112- Setting: `journal`
2113- Default:
2114
2115```json
2116"journal": {
2117 "path": "~",
2118 "hour_format": "hour12"
2119}
2120```
2121
2122### Path
2123
2124- Description: The path of the directory where journal entries are stored.
2125- Setting: `path`
2126- Default: `~`
2127
2128**Options**
2129
2130`string` values
2131
2132### Hour Format
2133
2134- Description: The format to use for displaying hours in the journal.
2135- Setting: `hour_format`
2136- Default: `hour12`
2137
2138**Options**
2139
21401. 12-hour format:
2141
2142```json
2143{
2144 "hour_format": "hour12"
2145}
2146```
2147
21482. 24-hour format:
2149
2150```json
2151{
2152 "hour_format": "hour24"
2153}
2154```
2155
2156## Languages
2157
2158- Description: Configuration for specific languages.
2159- Setting: `languages`
2160- Default: `null`
2161
2162**Options**
2163
2164To override settings for a language, add an entry for that languages name to the `languages` value. Example:
2165
2166```json
2167"languages": {
2168 "C": {
2169 "format_on_save": "off",
2170 "preferred_line_length": 64,
2171 "soft_wrap": "preferred_line_length"
2172 },
2173 "JSON": {
2174 "tab_size": 4
2175 }
2176}
2177```
2178
2179The following settings can be overridden for each specific language:
2180
2181- [`enable_language_server`](#enable-language-server)
2182- [`ensure_final_newline_on_save`](#ensure-final-newline-on-save)
2183- [`format_on_save`](#format-on-save)
2184- [`formatter`](#formatter)
2185- [`hard_tabs`](#hard-tabs)
2186- [`preferred_line_length`](#preferred-line-length)
2187- [`remove_trailing_whitespace_on_save`](#remove-trailing-whitespace-on-save)
2188- [`show_edit_predictions`](#show-edit-predictions)
2189- [`show_whitespaces`](#show-whitespaces)
2190- [`soft_wrap`](#soft-wrap)
2191- [`tab_size`](#tab-size)
2192- [`use_autoclose`](#use-autoclose)
2193- [`always_treat_brackets_as_autoclosed`](#always-treat-brackets-as-autoclosed)
2194
2195These values take in the same options as the root-level settings with the same name.
2196
2197## Network Proxy
2198
2199- Description: Configure a network proxy for Zed.
2200- Setting: `proxy`
2201- Default: `null`
2202
2203**Options**
2204
2205The proxy setting must contain a URL to the proxy.
2206
2207The following URI schemes are supported:
2208
2209- `http`
2210- `https`
2211- `socks4` - SOCKS4 proxy with local DNS
2212- `socks4a` - SOCKS4 proxy with remote DNS
2213- `socks5` - SOCKS5 proxy with local DNS
2214- `socks5h` - SOCKS5 proxy with remote DNS
2215
2216`http` will be used when no scheme is specified.
2217
2218By default no proxy will be used, or Zed will attempt to retrieve proxy settings from environment variables, such as `http_proxy`, `HTTP_PROXY`, `https_proxy`, `HTTPS_PROXY`, `all_proxy`, `ALL_PROXY`, `no_proxy` and `NO_PROXY`.
2219
2220For example, to set an `http` proxy, add the following to your settings:
2221
2222```json
2223{
2224 "proxy": "http://127.0.0.1:10809"
2225}
2226```
2227
2228Or to set a `socks5` proxy:
2229
2230```json
2231{
2232 "proxy": "socks5h://localhost:10808"
2233}
2234```
2235
2236If you wish to exclude certain hosts from using the proxy, set the `NO_PROXY` environment variable. This accepts a comma-separated list of hostnames, host suffixes, IPv4/IPv6 addresses or blocks that should not use the proxy. For example if your environment included `NO_PROXY="google.com, 192.168.1.0/24"` all hosts in `192.168.1.*`, `google.com` and `*.google.com` would bypass the proxy. See [reqwest NoProxy docs](https://docs.rs/reqwest/latest/reqwest/struct.NoProxy.html#method.from_string) for more.
2237
2238## Preview tabs
2239
2240- Description:
2241 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. \
2242 There are several ways to convert a preview tab into a regular tab:
2243
2244 - Double-clicking on the file
2245 - Double-clicking on the tab header
2246 - Using the `project_panel::OpenPermanent` action
2247 - Editing the file
2248 - Dragging the file to a different pane
2249
2250- Setting: `preview_tabs`
2251- Default:
2252
2253```json
2254"preview_tabs": {
2255 "enabled": true,
2256 "enable_preview_from_file_finder": false,
2257 "enable_preview_from_code_navigation": false,
2258}
2259```
2260
2261### Enable preview from file finder
2262
2263- Description: Determines whether to open files in preview mode when selected from the file finder.
2264- Setting: `enable_preview_from_file_finder`
2265- Default: `false`
2266
2267**Options**
2268
2269`boolean` values
2270
2271### Enable preview from code navigation
2272
2273- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
2274- Setting: `enable_preview_from_code_navigation`
2275- Default: `false`
2276
2277**Options**
2278
2279`boolean` values
2280
2281## File Finder
2282
2283### File Icons
2284
2285- Description: Whether to show file icons in the file finder.
2286- Setting: `file_icons`
2287- Default: `true`
2288
2289### Modal Max Width
2290
2291- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
2292- Setting: `modal_max_width`
2293- Default: `small`
2294
2295### Skip Focus For Active In Search
2296
2297- Description: Determines whether the file finder should skip focus for the active file in search results.
2298- Setting: `skip_focus_for_active_in_search`
2299- Default: `true`
2300
2301## Preferred Line Length
2302
2303- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
2304- Setting: `preferred_line_length`
2305- Default: `80`
2306
2307**Options**
2308
2309`integer` values
2310
2311## Projects Online By Default
2312
2313- Description: Whether or not to show the online projects view by default.
2314- Setting: `projects_online_by_default`
2315- Default: `true`
2316
2317**Options**
2318
2319`boolean` values
2320
2321## Remove Trailing Whitespace On Save
2322
2323- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
2324- Setting: `remove_trailing_whitespace_on_save`
2325- Default: `true`
2326
2327**Options**
2328
2329`boolean` values
2330
2331## Search
2332
2333- Description: Search options to enable by default when opening new project and buffer searches.
2334- Setting: `search`
2335- Default:
2336
2337```json
2338"search": {
2339 "whole_word": false,
2340 "case_sensitive": false,
2341 "include_ignored": false,
2342 "regex": false
2343},
2344```
2345
2346## Seed Search Query From Cursor
2347
2348- Description: When to populate a new search's query based on the text under the cursor.
2349- Setting: `seed_search_query_from_cursor`
2350- Default: `always`
2351
2352**Options**
2353
23541. `always` always populate the search query with the word under the cursor
23552. `selection` only populate the search query when there is text selected
23563. `never` never populate the search query
2357
2358## Use Smartcase Search
2359
2360- Description: When enabled, automatically adjusts search case sensitivity based on your query. If your search query contains any uppercase letters, the search becomes case-sensitive; if it contains only lowercase letters, the search becomes case-insensitive. \
2361 This applies to both in-file searches and project-wide searches.
2362- Setting: `use_smartcase_search`
2363- Default: `false`
2364
2365**Options**
2366
2367`boolean` values
2368
2369Examples:
2370
2371- Searching for "function" would match "function", "Function", "FUNCTION", etc.
2372- Searching for "Function" would only match "Function", not "function" or "FUNCTION"
2373
2374## Show Call Status Icon
2375
2376- Description: Whether or not to show the call status icon in the status bar.
2377- Setting: `show_call_status_icon`
2378- Default: `true`
2379
2380**Options**
2381
2382`boolean` values
2383
2384## Completions
2385
2386- Description: Controls how completions are processed for this language.
2387- Setting: `completions`
2388- Default:
2389
2390```json
2391{
2392 "completions": {
2393 "words": "fallback",
2394 "lsp": true,
2395 "lsp_fetch_timeout_ms": 0,
2396 "lsp_insert_mode": "replace_suffix"
2397 }
2398}
2399```
2400
2401### Words
2402
2403- Description: Controls how words are completed. For large documents, not all words may be fetched for completion.
2404- Setting: `words`
2405- Default: `fallback`
2406
2407**Options**
2408
24091. `enabled` - Always fetch document's words for completions along with LSP completions
24102. `fallback` - Only if LSP response errors or times out, use document's words to show completions
24113. `disabled` - Never fetch or complete document's words for completions (word-based completions can still be queried via a separate action)
2412
2413### LSP
2414
2415- Description: Whether to fetch LSP completions or not.
2416- Setting: `lsp`
2417- Default: `true`
2418
2419**Options**
2420
2421`boolean` values
2422
2423### LSP Fetch Timeout (ms)
2424
2425- Description: When fetching LSP completions, determines how long to wait for a response of a particular server. When set to 0, waits indefinitely.
2426- Setting: `lsp_fetch_timeout_ms`
2427- Default: `0`
2428
2429**Options**
2430
2431`integer` values representing milliseconds
2432
2433### LSP Insert Mode
2434
2435- Description: Controls what range to replace when accepting LSP completions.
2436- Setting: `lsp_insert_mode`
2437- Default: `replace_suffix`
2438
2439**Options**
2440
24411. `insert` - Replaces text before the cursor, using the `insert` range described in the LSP specification
24422. `replace` - Replaces text before and after the cursor, using the `replace` range described in the LSP specification
24433. `replace_subsequence` - Behaves like `"replace"` if the text that would be replaced is a subsequence of the completion text, and like `"insert"` otherwise
24444. `replace_suffix` - Behaves like `"replace"` if the text after the cursor is a suffix of the completion, and like `"insert"` otherwise
2445
2446## Show Completions On Input
2447
2448- Description: Whether or not to show completions as you type.
2449- Setting: `show_completions_on_input`
2450- Default: `true`
2451
2452**Options**
2453
2454`boolean` values
2455
2456## Show Completion Documentation
2457
2458- Description: Whether to display inline and alongside documentation for items in the completions menu.
2459- Setting: `show_completion_documentation`
2460- Default: `true`
2461
2462**Options**
2463
2464`boolean` values
2465
2466## Show Edit Predictions
2467
2468- Description: Whether to show edit predictions as you type or manually by triggering `editor::ShowEditPrediction`.
2469- Setting: `show_edit_predictions`
2470- Default: `true`
2471
2472**Options**
2473
2474`boolean` values
2475
2476## Show Whitespaces
2477
2478- Description: Whether or not to render whitespace characters in the editor.
2479- Setting: `show_whitespaces`
2480- Default: `selection`
2481
2482**Options**
2483
24841. `all`
24852. `selection`
24863. `none`
24874. `boundary`
2488
2489## Soft Wrap
2490
2491- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
2492- Setting: `soft_wrap`
2493- Default: `none`
2494
2495**Options**
2496
24971. `none` to avoid wrapping generally, unless the line is too long
24982. `prefer_line` (deprecated, same as `none`)
24993. `editor_width` to wrap lines that overflow the editor width
25004. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
25015. `bounded` to wrap lines at the minimum of `editor_width` and `preferred_line_length`
2502
2503## Wrap Guides (Vertical Rulers)
2504
2505- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
2506- Setting: `wrap_guides`
2507- Default: []
2508
2509**Options**
2510
2511List of `integer` column numbers
2512
2513## Tab Size
2514
2515- Description: The number of spaces to use for each tab character.
2516- Setting: `tab_size`
2517- Default: `4`
2518
2519**Options**
2520
2521`integer` values
2522
2523## Telemetry
2524
2525- Description: Control what info is collected by Zed.
2526- Setting: `telemetry`
2527- Default:
2528
2529```json
2530"telemetry": {
2531 "diagnostics": true,
2532 "metrics": true
2533},
2534```
2535
2536**Options**
2537
2538### Diagnostics
2539
2540- Description: Setting for sending debug-related data, such as crash reports.
2541- Setting: `diagnostics`
2542- Default: `true`
2543
2544**Options**
2545
2546`boolean` values
2547
2548### Metrics
2549
2550- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
2551- Setting: `metrics`
2552- Default: `true`
2553
2554**Options**
2555
2556`boolean` values
2557
2558## Terminal
2559
2560- Description: Configuration for the terminal.
2561- Setting: `terminal`
2562- Default:
2563
2564```json
2565{
2566 "terminal": {
2567 "alternate_scroll": "off",
2568 "blinking": "terminal_controlled",
2569 "copy_on_select": false,
2570 "keep_selection_on_copy": false,
2571 "dock": "bottom",
2572 "default_width": 640,
2573 "default_height": 320,
2574 "detect_venv": {
2575 "on": {
2576 "directories": [".env", "env", ".venv", "venv"],
2577 "activate_script": "default"
2578 }
2579 },
2580 "env": {},
2581 "font_family": null,
2582 "font_features": null,
2583 "font_size": null,
2584 "line_height": "comfortable",
2585 "option_as_meta": false,
2586 "button": true,
2587 "shell": "system",
2588 "toolbar": {
2589 "breadcrumbs": true
2590 },
2591 "working_directory": "current_project_directory",
2592 "scrollbar": {
2593 "show": null
2594 }
2595 }
2596}
2597```
2598
2599### Terminal: Dock
2600
2601- Description: Control the position of the dock
2602- Setting: `dock`
2603- Default: `bottom`
2604
2605**Options**
2606
2607`"bottom"`, `"left"` or `"right"`
2608
2609### Terminal: Alternate Scroll
2610
2611- 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.
2612- Setting: `alternate_scroll`
2613- Default: `off`
2614
2615**Options**
2616
26171. Default alternate scroll mode to off
2618
2619```json
2620{
2621 "terminal": {
2622 "alternate_scroll": "off"
2623 }
2624}
2625```
2626
26272. Default alternate scroll mode to on
2628
2629```json
2630{
2631 "terminal": {
2632 "alternate_scroll": "on"
2633 }
2634}
2635```
2636
2637### Terminal: Blinking
2638
2639- Description: Set the cursor blinking behavior in the terminal
2640- Setting: `blinking`
2641- Default: `terminal_controlled`
2642
2643**Options**
2644
26451. Never blink the cursor, ignore the terminal mode
2646
2647```json
2648{
2649 "terminal": {
2650 "blinking": "off"
2651 }
2652}
2653```
2654
26552. Default the cursor blink to off, but allow the terminal to turn blinking on
2656
2657```json
2658{
2659 "terminal": {
2660 "blinking": "terminal_controlled"
2661 }
2662}
2663```
2664
26653. Always blink the cursor, ignore the terminal mode
2666
2667```json
2668{
2669 "terminal": {
2670 "blinking": "on"
2671 }
2672}
2673```
2674
2675### Terminal: Copy On Select
2676
2677- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
2678- Setting: `copy_on_select`
2679- Default: `false`
2680
2681**Options**
2682
2683`boolean` values
2684
2685**Example**
2686
2687```json
2688{
2689 "terminal": {
2690 "copy_on_select": true
2691 }
2692}
2693```
2694
2695### Terminal: Keep Selection On Copy
2696
2697- Description: Whether or not to keep the selection in the terminal after copying text.
2698- Setting: `keep_selection_on_copy`
2699- Default: `false`
2700
2701**Options**
2702
2703`boolean` values
2704
2705**Example**
2706
2707```json
2708{
2709 "terminal": {
2710 "keep_selection_on_copy": true
2711 }
2712}
2713```
2714
2715### Terminal: Env
2716
2717- 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
2718- Setting: `env`
2719- Default: `{}`
2720
2721**Example**
2722
2723```json
2724{
2725 "terminal": {
2726 "env": {
2727 "ZED": "1",
2728 "KEY": "value1:value2"
2729 }
2730 }
2731}
2732```
2733
2734### Terminal: Font Size
2735
2736- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
2737- Setting: `font_size`
2738- Default: `null`
2739
2740**Options**
2741
2742`integer` values
2743
2744```json
2745{
2746 "terminal": {
2747 "font_size": 15
2748 }
2749}
2750```
2751
2752### Terminal: Font Family
2753
2754- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
2755- Setting: `font_family`
2756- Default: `null`
2757
2758**Options**
2759
2760The name of any font family installed on the user's system
2761
2762```json
2763{
2764 "terminal": {
2765 "font_family": "Berkeley Mono"
2766 }
2767}
2768```
2769
2770### Terminal: Font Features
2771
2772- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
2773- Setting: `font_features`
2774- Default: `null`
2775- Platform: macOS and Windows.
2776
2777**Options**
2778
2779See Buffer Font Features
2780
2781```json
2782{
2783 "terminal": {
2784 "font_features": {
2785 "calt": false
2786 // See Buffer Font Features for more features
2787 }
2788 }
2789}
2790```
2791
2792### Terminal: Line Height
2793
2794- Description: Set the terminal's line height.
2795- Setting: `line_height`
2796- Default: `comfortable`
2797
2798**Options**
2799
28001. Use a line height that's `comfortable` for reading, 1.618. (default)
2801
2802```json
2803{
2804 "terminal": {
2805 "line_height": "comfortable"
2806 }
2807}
2808```
2809
28102. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
2811
2812```json
2813{
2814 "terminal": {
2815 "line_height": "standard"
2816 }
2817}
2818```
2819
28203. Use a custom line height.
2821
2822```json
2823{
2824 "terminal": {
2825 "line_height": {
2826 "custom": 2
2827 }
2828 }
2829}
2830```
2831
2832### Terminal: Option As Meta
2833
2834- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
2835- Setting: `option_as_meta`
2836- Default: `false`
2837
2838**Options**
2839
2840`boolean` values
2841
2842```json
2843{
2844 "terminal": {
2845 "option_as_meta": true
2846 }
2847}
2848```
2849
2850### Terminal: Shell
2851
2852- Description: What shell to use when launching the terminal.
2853- Setting: `shell`
2854- Default: `system`
2855
2856**Options**
2857
28581. Use the system's default terminal configuration (usually the `/etc/passwd` file).
2859
2860```json
2861{
2862 "terminal": {
2863 "shell": "system"
2864 }
2865}
2866```
2867
28682. A program to launch:
2869
2870```json
2871{
2872 "terminal": {
2873 "shell": {
2874 "program": "sh"
2875 }
2876 }
2877}
2878```
2879
28803. A program with arguments:
2881
2882```json
2883{
2884 "terminal": {
2885 "shell": {
2886 "with_arguments": {
2887 "program": "/bin/bash",
2888 "args": ["--login"]
2889 }
2890 }
2891 }
2892}
2893```
2894
2895## Terminal: Detect Virtual Environments {#terminal-detect_venv}
2896
2897- Description: Activate the [Python Virtual Environment](https://docs.python.org/3/library/venv.html), if one is found, in the terminal's working directory (as resolved by the working_directory and automatically activating the virtual environment.
2898- Setting: `detect_venv`
2899- Default:
2900
2901```json
2902{
2903 "terminal": {
2904 "detect_venv": {
2905 "on": {
2906 // Default directories to search for virtual environments, relative
2907 // to the current working directory. We recommend overriding this
2908 // in your project's settings, rather than globally.
2909 "directories": [".env", "env", ".venv", "venv"],
2910 // Can also be `csh`, `fish`, and `nushell`
2911 "activate_script": "default"
2912 }
2913 }
2914 }
2915}
2916```
2917
2918Disable with:
2919
2920```json
2921{
2922 "terminal": {
2923 "detect_venv": "off"
2924 }
2925}
2926```
2927
2928## Terminal: Toolbar
2929
2930- Description: Whether or not to show various elements in the terminal toolbar.
2931- Setting: `toolbar`
2932- Default:
2933
2934```json
2935{
2936 "terminal": {
2937 "toolbar": {
2938 "breadcrumbs": true
2939 }
2940 }
2941}
2942```
2943
2944**Options**
2945
2946At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
2947
2948If the terminal title is empty, the breadcrumbs won't be shown.
2949
2950The shell running in the terminal needs to be configured to emit the title.
2951
2952Example command to set the title: `echo -e "\e]2;New Title\007";`
2953
2954### Terminal: Button
2955
2956- Description: Control to show or hide the terminal button in the status bar
2957- Setting: `button`
2958- Default: `true`
2959
2960**Options**
2961
2962`boolean` values
2963
2964```json
2965{
2966 "terminal": {
2967 "button": false
2968 }
2969}
2970```
2971
2972### Terminal: Working Directory
2973
2974- Description: What working directory to use when launching the terminal.
2975- Setting: `working_directory`
2976- Default: `"current_project_directory"`
2977
2978**Options**
2979
29801. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2981
2982```json
2983{
2984 "terminal": {
2985 "working_directory": "current_project_directory"
2986 }
2987}
2988```
2989
29902. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2991
2992```json
2993{
2994 "terminal": {
2995 "working_directory": "first_project_directory"
2996 }
2997}
2998```
2999
30003. Always use this platform's home directory (if we can find it)
3001
3002```json
3003{
3004 "terminal": {
3005 "working_directory": "always_home"
3006 }
3007}
3008```
3009
30104. 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.
3011
3012```json
3013{
3014 "terminal": {
3015 "working_directory": {
3016 "always": {
3017 "directory": "~/zed/projects/"
3018 }
3019 }
3020 }
3021}
3022```
3023
3024## Theme
3025
3026- 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.
3027- Setting: `theme`
3028- Default: `One Dark`
3029
3030### Theme Object
3031
3032- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
3033- Setting: `theme`
3034- Default:
3035
3036```json
3037"theme": {
3038 "mode": "system",
3039 "dark": "One Dark",
3040 "light": "One Light"
3041},
3042```
3043
3044### Mode
3045
3046- Description: Specify theme mode.
3047- Setting: `mode`
3048- Default: `system`
3049
3050**Options**
3051
30521. Set the theme to dark mode
3053
3054```json
3055{
3056 "mode": "dark"
3057}
3058```
3059
30602. Set the theme to light mode
3061
3062```json
3063{
3064 "mode": "light"
3065}
3066```
3067
30683. Set the theme to system mode
3069
3070```json
3071{
3072 "mode": "system"
3073}
3074```
3075
3076### Dark
3077
3078- Description: The name of the dark Zed theme to use for the UI.
3079- Setting: `dark`
3080- Default: `One Dark`
3081
3082**Options**
3083
3084Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
3085
3086### Light
3087
3088- Description: The name of the light Zed theme to use for the UI.
3089- Setting: `light`
3090- Default: `One Light`
3091
3092**Options**
3093
3094Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
3095
3096## Vim
3097
3098- Description: Whether or not to enable vim mode (work in progress).
3099- Setting: `vim_mode`
3100- Default: `false`
3101
3102## Project Panel
3103
3104- Description: Customize project panel
3105- Setting: `project_panel`
3106- Default:
3107
3108```json
3109{
3110 "project_panel": {
3111 "button": true,
3112 "default_width": 240,
3113 "dock": "left",
3114 "entry_spacing": "comfortable",
3115 "file_icons": true,
3116 "folder_icons": true,
3117 "git_status": true,
3118 "indent_size": 20,
3119 "auto_reveal_entries": true,
3120 "auto_fold_dirs": true,
3121 "scrollbar": {
3122 "show": null
3123 },
3124 "show_diagnostics": "all",
3125 "indent_guides": {
3126 "show": "always"
3127 },
3128 "hide_root": false
3129 }
3130}
3131```
3132
3133### Dock
3134
3135- Description: Control the position of the dock
3136- Setting: `dock`
3137- Default: `left`
3138
3139**Options**
3140
31411. Default dock position to left
3142
3143```json
3144{
3145 "dock": "left"
3146}
3147```
3148
31492. Default dock position to right
3150
3151```json
3152{
3153 "dock": "right"
3154}
3155```
3156
3157### Entry Spacing
3158
3159- Description: Spacing between worktree entries
3160- Setting: `entry_spacing`
3161- Default: `comfortable`
3162
3163**Options**
3164
31651. Comfortable entry spacing
3166
3167```json
3168{
3169 "entry_spacing": "comfortable"
3170}
3171```
3172
31732. Standard entry spacing
3174
3175```json
3176{
3177 "entry_spacing": "standard"
3178}
3179```
3180
3181### Git Status
3182
3183- Description: Indicates newly created and updated files
3184- Setting: `git_status`
3185- Default: `true`
3186
3187**Options**
3188
31891. Default enable git status
3190
3191```json
3192{
3193 "git_status": true
3194}
3195```
3196
31972. Default disable git status
3198
3199```json
3200{
3201 "git_status": false
3202}
3203```
3204
3205### Default Width
3206
3207- Description: Customize default width taken by project panel
3208- Setting: `default_width`
3209- Default: `240`
3210
3211**Options**
3212
3213`float` values
3214
3215### Auto Reveal Entries
3216
3217- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
3218- Setting: `auto_reveal_entries`
3219- Default: `true`
3220
3221**Options**
3222
32231. Enable auto reveal entries
3224
3225```json
3226{
3227 "auto_reveal_entries": true
3228}
3229```
3230
32312. Disable auto reveal entries
3232
3233```json
3234{
3235 "auto_reveal_entries": false
3236}
3237```
3238
3239### Auto Fold Dirs
3240
3241- Description: Whether to fold directories automatically when directory has only one directory inside.
3242- Setting: `auto_fold_dirs`
3243- Default: `true`
3244
3245**Options**
3246
32471. Enable auto fold dirs
3248
3249```json
3250{
3251 "auto_fold_dirs": true
3252}
3253```
3254
32552. Disable auto fold dirs
3256
3257```json
3258{
3259 "auto_fold_dirs": false
3260}
3261```
3262
3263### Indent Size
3264
3265- Description: Amount of indentation (in pixels) for nested items.
3266- Setting: `indent_size`
3267- Default: `20`
3268
3269### Indent Guides: Show
3270
3271- Description: Whether to show indent guides in the project panel.
3272- Setting: `indent_guides`
3273- Default:
3274
3275```json
3276"indent_guides": {
3277 "show": "always"
3278}
3279```
3280
3281**Options**
3282
32831. Show indent guides in the project panel
3284
3285```json
3286{
3287 "indent_guides": {
3288 "show": "always"
3289 }
3290}
3291```
3292
32932. Hide indent guides in the project panel
3294
3295```json
3296{
3297 "indent_guides": {
3298 "show": "never"
3299 }
3300}
3301```
3302
3303### Scrollbar: Show
3304
3305- Description: Whether to show a scrollbar in the project panel. Possible values: null, "auto", "system", "always", "never". Inherits editor settings when absent, see its description for more details.
3306- Setting: `scrollbar`
3307- Default:
3308
3309```json
3310"scrollbar": {
3311 "show": null
3312}
3313```
3314
3315**Options**
3316
33171. Show scrollbar in the project panel
3318
3319```json
3320{
3321 "scrollbar": {
3322 "show": "always"
3323 }
3324}
3325```
3326
33272. Hide scrollbar in the project panel
3328
3329```json
3330{
3331 "scrollbar": {
3332 "show": "never"
3333 }
3334}
3335```
3336
3337## Agent
3338
3339- Description: Customize agent behavior
3340- Setting: `agent`
3341- Default:
3342
3343```json
3344"agent": {
3345 "version": "2",
3346 "enabled": true,
3347 "button": true,
3348 "dock": "right",
3349 "default_width": 640,
3350 "default_height": 320,
3351 "default_view": "thread",
3352 "default_model": {
3353 "provider": "zed.dev",
3354 "model": "claude-sonnet-4"
3355 },
3356 "single_file_review": true,
3357}
3358```
3359
3360## Outline Panel
3361
3362- Description: Customize outline Panel
3363- Setting: `outline_panel`
3364- Default:
3365
3366```json
3367"outline_panel": {
3368 "button": true,
3369 "default_width": 300,
3370 "dock": "left",
3371 "file_icons": true,
3372 "folder_icons": true,
3373 "git_status": true,
3374 "indent_size": 20,
3375 "auto_reveal_entries": true,
3376 "auto_fold_dirs": true,
3377 "indent_guides": {
3378 "show": "always"
3379 },
3380 "scrollbar": {
3381 "show": null
3382 }
3383}
3384```
3385
3386## Calls
3387
3388- Description: Customize behavior when participating in a call
3389- Setting: `calls`
3390- Default:
3391
3392```json
3393"calls": {
3394 // Join calls with the microphone live by default
3395 "mute_on_join": false,
3396 // Share your project when you are the first to join a channel
3397 "share_on_join": false
3398},
3399```
3400
3401## Unnecessary Code Fade
3402
3403- Description: How much to fade out unused code.
3404- Setting: `unnecessary_code_fade`
3405- Default: `0.3`
3406
3407**Options**
3408
3409Float values between `0.0` and `0.9`, where:
3410
3411- `0.0` means no fading (unused code looks the same as used code)
3412- `0.9` means maximum fading (unused code is very faint but still visible)
3413
3414**Example**
3415
3416```json
3417{
3418 "unnecessary_code_fade": 0.5
3419}
3420```
3421
3422## UI Font Family
3423
3424- Description: The name of the font to use for text in the UI.
3425- Setting: `ui_font_family`
3426- Default: `Zed Plex Sans`
3427
3428**Options**
3429
3430The name of any font family installed on the system.
3431
3432## UI Font Features
3433
3434- Description: The OpenType features to enable for text in the UI.
3435- Setting: `ui_font_features`
3436- Default:
3437
3438```json
3439"ui_font_features": {
3440 "calt": false
3441}
3442```
3443
3444- Platform: macOS and Windows.
3445
3446**Options**
3447
3448Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
3449
3450For example, to disable font ligatures, add the following to your settings:
3451
3452```json
3453{
3454 "ui_font_features": {
3455 "calt": false
3456 }
3457}
3458```
3459
3460You can also set other OpenType features, like setting `cv01` to `7`:
3461
3462```json
3463{
3464 "ui_font_features": {
3465 "cv01": 7
3466 }
3467}
3468```
3469
3470## UI Font Fallbacks
3471
3472- Description: The font fallbacks to use for text in the UI.
3473- Setting: `ui_font_fallbacks`
3474- Default: `null`
3475- Platform: macOS and Windows.
3476
3477**Options**
3478
3479For example, to use `Nerd Font` as a fallback, add the following to your settings:
3480
3481```json
3482{
3483 "ui_font_fallbacks": ["Nerd Font"]
3484}
3485```
3486
3487## UI Font Size
3488
3489- Description: The default font size for text in the UI.
3490- Setting: `ui_font_size`
3491- Default: `16`
3492
3493**Options**
3494
3495`integer` values from `6` to `100` pixels (inclusive)
3496
3497## UI Font Weight
3498
3499- Description: The default font weight for text in the UI.
3500- Setting: `ui_font_weight`
3501- Default: `400`
3502
3503**Options**
3504
3505`integer` values between `100` and `900`
3506
3507## An example configuration:
3508
3509```json
3510// ~/.config/zed/settings.json
3511{
3512 "theme": "cave-light",
3513 "tab_size": 2,
3514 "preferred_line_length": 80,
3515 "soft_wrap": "none",
3516
3517 "buffer_font_size": 18,
3518 "buffer_font_family": "Zed Plex Mono",
3519
3520 "autosave": "on_focus_change",
3521 "format_on_save": "off",
3522 "vim_mode": false,
3523 "projects_online_by_default": true,
3524 "terminal": {
3525 "font_family": "FiraCode Nerd Font Mono",
3526 "blinking": "off"
3527 },
3528 "languages": {
3529 "C": {
3530 "format_on_save": "language_server",
3531 "preferred_line_length": 64,
3532 "soft_wrap": "preferred_line_length"
3533 }
3534 }
3535}
3536```