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
34Styling settings applied to the active pane.
35
36### Magnification
37
38- 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.
39- Setting: `magnification`
40- Default: `1.0`
41
42### Border size
43
44- 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.
45- Setting: `border_size`
46- Default: `0.0`
47
48### Inactive Opacity
49
50- 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.
51- Setting: `inactive_opacity`
52- Default: `1.0`
53
54**Options**
55
56`float` values
57
58## Auto Install extensions
59
60- Description: Define extensions to be autoinstalled or never be installed.
61- Setting: `auto_install_extension`
62- Default: `{"html": true}`
63
64**Options**
65
66You can find the names of your currently installed extensions by listing the subfolders under the [extension installation location](./extensions/installing-extensions#installation-location):
67
68On MacOS:
69
70```sh
71ls ~/Library/Application\ Support/Zed/extensions/installed/
72```
73
74On Linux:
75
76```sh
77ls ~/.local/share/zed/extensions/installed
78```
79
80Define extensions which should be installed (`true`) or never installed (`false`).
81
82```json
83{
84 "auto_install_extensions": {
85 "html": true,
86 "dockerfile": true,
87 "docker-compose": false
88 }
89}
90```
91
92## Autosave
93
94- Description: When to automatically save edited buffers.
95- Setting: `autosave`
96- Default: `off`
97
98**Options**
99
1001. To disable autosave, set it to `off`:
101
102```json
103{
104 "autosave": "off"
105}
106```
107
1082. To autosave when focus changes, use `on_focus_change`:
109
110```json
111{
112 "autosave": "on_focus_change"
113}
114```
115
1163. To autosave when the active window changes, use `on_window_change`:
117
118```json
119{
120 "autosave": "on_window_change"
121}
122```
123
1244. To autosave after an inactivity period, use `after_delay`:
125
126```json
127{
128 "autosave": {
129 "after_delay": {
130 "milliseconds": 1000
131 }
132 }
133}
134```
135
136## Restore on Startup
137
138- Description: Controls session restoration on startup.
139- Setting: `restore_on_startup`
140- Default: `last_session`
141
142**Options**
143
1441. Restore all workspaces that were open when quitting Zed:
145
146```json
147{
148 "restore_on_startup": "last_session"
149}
150```
151
1522. Restore the workspace that was closed last:
153
154```json
155{
156 "restore_on_startup": "last_workspace"
157}
158```
159
1603. Always start with an empty editor:
161
162```json
163{
164 "restore_on_startup": "none"
165}
166```
167
168## Autoscroll on Clicks
169
170- Description: Whether to scroll when clicking near the edge of the visible text area.
171- Setting: `autoscroll_on_clicks`
172- Default: `false`
173
174**Options**
175
176`boolean` values
177
178## Auto Update
179
180- Description: Whether or not to automatically check for updates.
181- Setting: `auto_update`
182- Default: `true`
183
184**Options**
185
186`boolean` values
187
188## Base Keymap
189
190- Description: Base key bindings scheme. Base keymaps can be overridden with user keymaps.
191- Setting: `base_keymap`
192- Default: `VSCode`
193
194**Options**
195
1961. VSCode
197
198```json
199{
200 "base_keymap": "VSCode"
201}
202```
203
2042. Atom
205
206```json
207{
208 "base_keymap": "Atom"
209}
210```
211
2123. JetBrains
213
214```json
215{
216 "base_keymap": "JetBrains"
217}
218```
219
2204. None
221
222```json
223{
224 "base_keymap": "None"
225}
226```
227
2285. SublimeText
229
230```json
231{
232 "base_keymap": "SublimeText"
233}
234```
235
2366. TextMate
237
238```json
239{
240 "base_keymap": "TextMate"
241}
242```
243
244## Buffer Font Family
245
246- Description: The name of a font to use for rendering text in the editor.
247- Setting: `buffer_font_family`
248- Default: `Zed Plex Mono`
249
250**Options**
251
252The name of any font family installed on the user's system
253
254## Buffer Font Features
255
256- Description: The OpenType features to enable for text in the editor.
257- Setting: `buffer_font_features`
258- Default: `null`
259- Platform: macOS and Windows.
260
261**Options**
262
263Zed 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.
264
265For example, to disable font ligatures, add the following to your settings:
266
267```json
268{
269 "buffer_font_features": {
270 "calt": false
271 }
272}
273```
274
275You can also set other OpenType features, like setting `cv01` to `7`:
276
277```json
278{
279 "buffer_font_features": {
280 "cv01": 7
281 }
282}
283```
284
285## Buffer Font Fallbacks
286
287- Description: Set the buffer text's font fallbacks, this will be merged with the platform's default fallbacks.
288- Setting: `buffer_font_fallbacks`
289- Default: `null`
290- Platform: macOS and Windows.
291
292**Options**
293
294For example, to use `Nerd Font` as a fallback, add the following to your settings:
295
296```json
297{
298 "buffer_font_fallbacks": ["Nerd Font"]
299}
300```
301
302## Buffer Font Size
303
304- Description: The default font size for text in the editor.
305- Setting: `buffer_font_size`
306- Default: `15`
307
308**Options**
309
310`integer` values from `6` to `100` pixels (inclusive)
311
312## Buffer Font Weight
313
314- Description: The default font weight for text in the editor.
315- Setting: `buffer_font_weight`
316- Default: `400`
317
318**Options**
319
320`integer` values between `100` and `900`
321
322## Buffer Line Height
323
324- Description: The default line height for text in the editor.
325- Setting: `buffer_line_height`
326- Default: `"comfortable"`
327
328**Options**
329
330`"standard"`, `"comfortable"` or `{"custom": float}` (`1` is very compact, `2` very loose)
331
332## Confirm Quit
333
334- Description: Whether or not to prompt the user to confirm before closing the application.
335- Setting: `confirm_quit`
336- Default: `false`
337
338**Options**
339
340`boolean` values
341
342## Centered Layout
343
344- Description: Configuration for the centered layout mode.
345- Setting: `centered_layout`
346- Default:
347
348```json
349"centered_layout": {
350 "left_padding": 0.2,
351 "right_padding": 0.2,
352}
353```
354
355**Options**
356
357The `left_padding` and `right_padding` options define the relative width of the
358left 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`.
359
360## Direnv Integration
361
362- Description: Settings for [direnv](https://direnv.net/) integration. Requires `direnv` to be installed.
363 `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.
364 It also allows for those environment variables to be used in tasks.
365- Setting: `load_direnv`
366- Default:
367
368```json
369"load_direnv": "direct"
370```
371
372**Options**
373There are two options to choose from:
374
3751. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
3762. `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.
377
378## Edit Predictions
379
380- Description: Settings for edit predictions.
381- Setting: `edit_predictions`
382- Default:
383
384```json
385 "edit_predictions": {
386 "disabled_globs": [
387 "**/.env*",
388 "**/*.pem",
389 "**/*.key",
390 "**/*.cert",
391 "**/*.crt",
392 "**/secrets.yml"
393 ]
394 }
395```
396
397**Options**
398
399### Disabled Globs
400
401- 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.
402- Setting: `disabled_globs`
403- Default: `["**/.env*", "**/*.pem", "**/*.key", "**/*.cert", "**/*.crt", "**/secrets.yml"]`
404
405**Options**
406
407List of `string` values.
408
409## Edit Predictions Disabled in
410
411- Description: A list of language scopes in which edit predictions should be disabled.
412- Setting: `edit_predictions_disabled_in`
413- Default: `[]`
414
415**Options**
416
417List of `string` values
418
4191. Don't show edit predictions in comments:
420
421```json
422"disabled_in": ["comment"]
423```
424
4252. Don't show edit predictions in strings and comments:
426
427```json
428"disabled_in": ["comment", "string"]
429```
430
4313. Only in Go, don't show edit predictions in strings and comments:
432
433```json
434{
435 "languages": {
436 "Go": {
437 "edit_predictions_disabled_in": ["comment", "string"]
438 }
439 }
440}
441```
442
443## Current Line Highlight
444
445- Description: How to highlight the current line in the editor.
446- Setting: `current_line_highlight`
447- Default: `all`
448
449**Options**
450
4511. Don't highlight the current line:
452
453```json
454"current_line_highlight": "none"
455```
456
4572. Highlight the gutter area:
458
459```json
460"current_line_highlight": "gutter"
461```
462
4633. Highlight the editor area:
464
465```json
466"current_line_highlight": "line"
467```
468
4694. Highlight the full line:
470
471```json
472"current_line_highlight": "all"
473```
474
475## Selection Highlight
476
477- Description: Whether to highlight all occurrences of the selected text in an editor.
478- Setting: `selection_highlight`
479- Default: `true`
480
481## Selection Highlight Debounce
482
483- Description: The debounce delay before querying highlights based on the selected text.
484
485- Setting: `selection_highlight_debounce`
486- Default: `50`
487
488## LSP Highlight Debounce
489
490- Description: The debounce delay before querying highlights from the language server based on the current cursor location.
491- Setting: `lsp_highlight_debounce`
492- Default: `75`
493
494## Cursor Blink
495
496- Description: Whether or not the cursor blinks.
497- Setting: `cursor_blink`
498- Default: `true`
499
500**Options**
501
502`boolean` values
503
504## Cursor Shape
505
506- Description: Cursor shape for the default editor.
507- Setting: `cursor_shape`
508- Default: `bar`
509
510**Options**
511
5121. A vertical bar:
513
514```json
515"cursor_shape": "bar"
516```
517
5182. A block that surrounds the following character:
519
520```json
521"cursor_shape": "block"
522```
523
5243. An underline / underscore that runs along the following character:
525
526```json
527"cursor_shape": "underline"
528```
529
5304. An box drawn around the following character:
531
532```json
533"cursor_shape": "hollow"
534```
535
536## Editor Scrollbar
537
538- Description: Whether or not to show the editor scrollbar and various elements in it.
539- Setting: `scrollbar`
540- Default:
541
542```json
543"scrollbar": {
544 "show": "auto",
545 "cursors": true,
546 "git_diff": true,
547 "search_results": true,
548 "selected_text": true,
549 "selected_symbol": true,
550 "diagnostics": "all",
551 "axes": {
552 "horizontal": true,
553 "vertical": true,
554 },
555},
556```
557
558### Show Mode
559
560- Description: When to show the editor scrollbar.
561- Setting: `show`
562- Default: `auto`
563
564**Options**
565
5661. Show the scrollbar if there's important information or follow the system's configured behavior:
567
568```json
569"scrollbar": {
570 "show": "auto"
571}
572```
573
5742. Match the system's configured behavior:
575
576```json
577"scrollbar": {
578 "show": "system"
579}
580```
581
5823. Always show the scrollbar:
583
584```json
585"scrollbar": {
586 "show": "always"
587}
588```
589
5904. Never show the scrollbar:
591
592```json
593"scrollbar": {
594 "show": "never"
595}
596```
597
598### Cursor Indicators
599
600- Description: Whether to show cursor positions in the scrollbar.
601- Setting: `cursors`
602- Default: `true`
603
604**Options**
605
606`boolean` values
607
608### Git Diff Indicators
609
610- Description: Whether to show git diff indicators in the scrollbar.
611- Setting: `git_diff`
612- Default: `true`
613
614**Options**
615
616`boolean` values
617
618### Search Results Indicators
619
620- Description: Whether to show buffer search results in the scrollbar.
621- Setting: `search_results`
622- Default: `true`
623
624**Options**
625
626`boolean` values
627
628### Selected Text Indicators
629
630- Description: Whether to show selected text occurrences in the scrollbar.
631- Setting: `selected_text`
632- Default: `true`
633
634**Options**
635
636`boolean` values
637
638### Selected Symbols Indicators
639
640- Description: Whether to show selected symbol occurrences in the scrollbar.
641- Setting: `selected_symbol`
642- Default: `true`
643
644**Options**
645
646`boolean` values
647
648### Diagnostics
649
650- Description: Which diagnostic indicators to show in the scrollbar.
651- Setting: `diagnostics`
652- Default: `all`
653
654**Options**
655
6561. Show all diagnostics:
657
658```json
659{
660 "diagnostics": "all"
661}
662```
663
6642. Do not show any diagnostics:
665
666```json
667{
668 "diagnostics": "none"
669}
670```
671
6723. Show only errors:
673
674```json
675{
676 "diagnostics": "error"
677}
678```
679
6804. Show only errors and warnings:
681
682```json
683{
684 "diagnostics": "warning"
685}
686```
687
6885. Show only errors, warnings, and information:
689
690```json
691{
692 "diagnostics": "information"
693}
694```
695
696### Axes
697
698- Description: Forcefully enable or disable the scrollbar for each axis
699- Setting: `axes`
700- Default:
701
702```json
703"scrollbar": {
704 "axes": {
705 "horizontal": true,
706 "vertical": true,
707 },
708}
709```
710
711#### Horizontal
712
713- Description: When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
714- Setting: `horizontal`
715- Default: `true`
716
717**Options**
718
719`boolean` values
720
721#### Vertical
722
723- Description: When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
724- Setting: `vertical`
725- Default: `true`
726
727**Options**
728
729`boolean` values
730
731## Editor Tab Bar
732
733- Description: Settings related to the editor's tab bar.
734- Settings: `tab_bar`
735- Default:
736
737```json
738"tab_bar": {
739 "show": true,
740 "show_nav_history_buttons": true,
741 "show_tab_bar_buttons": true
742}
743```
744
745### Show
746
747- Description: Whether or not to show the tab bar in the editor.
748- Setting: `show`
749- Default: `true`
750
751**Options**
752
753`boolean` values
754
755### Navigation History Buttons
756
757- Description: Whether or not to show the navigation history buttons.
758- Setting: `show_nav_history_buttons`
759- Default: `true`
760
761**Options**
762
763`boolean` values
764
765### Tab Bar Buttons
766
767- Description: Whether or not to show the tab bar buttons.
768- Setting: `show_tab_bar_buttons`
769- Default: `true`
770
771**Options**
772
773`boolean` values
774
775## Editor Tabs
776
777- Description: Configuration for the editor tabs.
778- Setting: `tabs`
779- Default:
780
781```json
782"tabs": {
783 "close_position": "right",
784 "file_icons": false,
785 "git_status": false,
786 "activate_on_close": "history",
787 "show_close_button": "hover"
788},
789```
790
791### Close Position
792
793- Description: Where to display close button within a tab.
794- Setting: `close_position`
795- Default: `right`
796
797**Options**
798
7991. Display the close button on the right:
800
801```json
802{
803 "close_position": "right"
804}
805```
806
8072. Display the close button on the left:
808
809```json
810{
811 "close_position": "left"
812}
813```
814
815### File Icons
816
817- Description: Whether to show the file icon for a tab.
818- Setting: `file_icons`
819- Default: `false`
820
821### Git Status
822
823- Description: Whether or not to show Git file status in tab.
824- Setting: `git_status`
825- Default: `false`
826
827### Activate on close
828
829- Description: What to do after closing the current tab.
830- Setting: `activate_on_close`
831- Default: `history`
832
833**Options**
834
8351. Activate the tab that was open previously:
836
837```json
838{
839 "activate_on_close": "history"
840}
841```
842
8432. Activate the right neighbour tab if present:
844
845```json
846{
847 "activate_on_close": "neighbour"
848}
849```
850
8513. Activate the left neighbour tab if present:
852
853```json
854{
855 "activate_on_close": "left_neighbour"
856}
857```
858
859### Show close button
860
861- Description: Controls the appearance behavior of the tab's close button.
862- Setting: `show_close_button`
863- Default: `hover`
864
865**Options**
866
8671. Show it just upon hovering the tab:
868
869```json
870{
871 "show_close_button": "hover"
872}
873```
874
8752. Show it persistently:
876
877```json
878{
879 "show_close_button": "always"
880}
881```
882
8833. Never show it, even if hovering it:
884
885```json
886{
887 "show_close_button": "hidden"
888}
889```
890
891## Editor Toolbar
892
893- Description: Whether or not to show various elements in the editor toolbar.
894- Setting: `toolbar`
895- Default:
896
897```json
898"toolbar": {
899 "breadcrumbs": true,
900 "quick_actions": true
901},
902```
903
904**Options**
905
906Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
907
908## Enable Language Server
909
910- Description: Whether or not to use language servers to provide code intelligence.
911- Setting: `enable_language_server`
912- Default: `true`
913
914**Options**
915
916`boolean` values
917
918## Ensure Final Newline On Save
919
920- Description: Removes any lines containing only whitespace at the end of the file and ensures just one newline at the end.
921- Setting: `ensure_final_newline_on_save`
922- Default: `true`
923
924**Options**
925
926`boolean` values
927
928## LSP
929
930- Description: Configuration for language servers.
931- Setting: `lsp`
932- Default: `null`
933
934**Options**
935
936The following settings can be overridden for specific language servers:
937
938- `initialization_options`
939- `settings`
940
941To override configuration for a language server, add an entry for that language server's name to the `lsp` value.
942
943Some 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.
944
945For example to pass the `check` option to `rust-analyzer`, use the following configuration:
946
947```json
948"lsp": {
949 "rust-analyzer": {
950 "initialization_options": {
951 "check": {
952 "command": "clippy" // rust-analyzer.check.command (default: "check")
953 }
954 }
955 }
956}
957```
958
959While other options may be changed at a runtime and should be placed under `settings`:
960
961```json
962"lsp": {
963 "yaml-language-server": {
964 "settings": {
965 "yaml": {
966 "keyOrdering": true // Enforces alphabetical ordering of keys in maps
967 }
968 }
969 }
970}
971```
972
973## LSP Highlight Debounce
974
975- Description: The debounce delay in milliseconds before querying highlights from the language server based on the current cursor location.
976- Setting: `lsp_highlight_debounce`
977- Default: `75`
978
979**Options**
980
981`integer` values representing milliseconds
982
983## Format On Save
984
985- Description: Whether or not to perform a buffer format before saving.
986- Setting: `format_on_save`
987- Default: `on`
988
989**Options**
990
9911. `on`, enables format on save obeying `formatter` setting:
992
993```json
994{
995 "format_on_save": "on"
996}
997```
998
9992. `off`, disables format on save:
1000
1001```json
1002{
1003 "format_on_save": "off"
1004}
1005```
1006
1007## Formatter
1008
1009- Description: How to perform a buffer format.
1010- Setting: `formatter`
1011- Default: `auto`
1012
1013**Options**
1014
10151. To use the current language server, use `"language_server"`:
1016
1017```json
1018{
1019 "formatter": "language_server"
1020}
1021```
1022
10232. 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):
1024
1025```json
1026{
1027 "formatter": {
1028 "external": {
1029 "command": "sed",
1030 "arguments": ["-e", "s/ *$//"]
1031 }
1032 }
1033}
1034```
1035
10363. 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.
1037
1038WARNING: `{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.
1039
1040```json
1041 "formatter": {
1042 "external": {
1043 "command": "prettier",
1044 "arguments": ["--stdin-filepath", "{buffer_path}"]
1045 }
1046 }
1047```
1048
10494. Or to use code actions provided by the connected language servers, use `"code_actions"`:
1050
1051```json
1052{
1053 "formatter": {
1054 "code_actions": {
1055 // Use ESLint's --fix:
1056 "source.fixAll.eslint": true,
1057 // Organize imports on save:
1058 "source.organizeImports": true
1059 }
1060 }
1061}
1062```
1063
10645. Or to use multiple formatters consecutively, use an array of formatters:
1065
1066```json
1067{
1068 "formatter": [
1069 { "language_server": { "name": "rust-analyzer" } },
1070 {
1071 "external": {
1072 "command": "sed",
1073 "arguments": ["-e", "s/ *$//"]
1074 }
1075 }
1076 ]
1077}
1078```
1079
1080Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
1081If any of the formatters fails, the subsequent ones will still be executed.
1082
1083## Code Actions On Format
1084
1085- Description: The code actions to perform with the primary language server when formatting the buffer.
1086- Setting: `code_actions_on_format`
1087- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
1088
1089**Examples**
1090
1091<!--
1092TBD: Add Python Ruff source.organizeImports example
1093-->
1094
10951. Organize imports on format in TypeScript and TSX buffers:
1096
1097```json
1098{
1099 "languages": {
1100 "TypeScript": {
1101 "code_actions_on_format": {
1102 "source.organizeImports": true
1103 }
1104 },
1105 "TSX": {
1106 "code_actions_on_format": {
1107 "source.organizeImports": true
1108 }
1109 }
1110 }
1111}
1112```
1113
11142. Run ESLint `fixAll` code action when formatting:
1115
1116```json
1117{
1118 "languages": {
1119 "JavaScript": {
1120 "code_actions_on_format": {
1121 "source.fixAll.eslint": true
1122 }
1123 }
1124 }
1125}
1126```
1127
11283. Run only a single ESLint rule when using `fixAll`:
1129
1130```json
1131{
1132 "languages": {
1133 "JavaScript": {
1134 "code_actions_on_format": {
1135 "source.fixAll.eslint": true
1136 }
1137 }
1138 },
1139 "lsp": {
1140 "eslint": {
1141 "settings": {
1142 "codeActionOnSave": {
1143 "rules": ["import/order"]
1144 }
1145 }
1146 }
1147 }
1148}
1149```
1150
1151## Auto close
1152
1153- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
1154- Setting: `use_autoclose`
1155- Default: `true`
1156
1157**Options**
1158
1159`boolean` values
1160
1161## Always Treat Brackets As Autoclosed
1162
1163- Description: Controls how the editor handles the autoclosed characters.
1164- Setting: `always_treat_brackets_as_autoclosed`
1165- Default: `false`
1166
1167**Options**
1168
1169`boolean` values
1170
1171**Example**
1172
1173If the setting is set to `true`:
1174
11751. Enter in the editor: `)))`
11762. Move the cursor to the start: `^)))`
11773. Enter again: `)))`
1178
1179The result is still `)))` and not `))))))`, which is what it would be by default.
1180
1181## File Scan Exclusions
1182
1183- Setting: `file_scan_exclusions`
1184- 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`.
1185- Default:
1186
1187```json
1188"file_scan_exclusions": [
1189 "**/.git",
1190 "**/.svn",
1191 "**/.hg",
1192 "**/.jj",
1193 "**/CVS",
1194 "**/.DS_Store",
1195 "**/Thumbs.db",
1196 "**/.classpath",
1197 "**/.settings"
1198],
1199```
1200
1201Note, 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.
1202
1203## File Scan Inclusions
1204
1205- Setting: `file_scan_inclusions`
1206- 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.
1207- Default:
1208
1209```json
1210"file_scan_inclusions": [".env*"],
1211```
1212
1213## File Types
1214
1215- Setting: `file_types`
1216- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
1217- Default: `{}`
1218
1219**Examples**
1220
1221To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
1222
1223```json
1224{
1225 "file_types": {
1226 "C++": ["c"],
1227 "TOML": ["MyLockFile"],
1228 "Dockerfile": ["Dockerfile*"]
1229 }
1230}
1231```
1232
1233## Diagnostics
1234
1235- Description: Configuration for diagnostics-related features.
1236- Setting: `diagnostics`
1237- Default:
1238
1239```json
1240{
1241 "diagnostics": {
1242 "include_warnings": true,
1243 "inline": {
1244 "enabled": false
1245 }
1246 "update_with_cursor": false,
1247 "primary_only": false,
1248 "use_rendered": false,
1249 }
1250}
1251```
1252
1253### Inline Diagnostics
1254
1255- Description: Whether or not to show diagnostics information inline.
1256- Setting: `inline`
1257- Default:
1258
1259```json
1260{
1261 "diagnostics": {
1262 "inline": {
1263 "enabled": false,
1264 "update_debounce_ms": 150,
1265 "padding": 4,
1266 "min_column": 0,
1267 "max_severity": null
1268 }
1269 }
1270}
1271```
1272
1273**Options**
1274
12751. Enable inline diagnostics.
1276
1277```json
1278{
1279 "diagnostics": {
1280 "inline": {
1281 "enabled": true
1282 }
1283 }
1284}
1285```
1286
12872. Delay diagnostic updates until some time after the last diagnostic update.
1288
1289```json
1290{
1291 "diagnostics": {
1292 "inline": {
1293 "enabled": true,
1294 "update_debounce_ms": 150
1295 }
1296 }
1297}
1298```
1299
13003. Set padding between the end of the source line and the start of the diagnostic.
1301
1302```json
1303{
1304 "diagnostics": {
1305 "inline": {
1306 "enabled": true,
1307 "padding": 4
1308 }
1309 }
1310}
1311```
1312
13134. Horizontally align inline diagnostics at the given column.
1314
1315```json
1316{
1317 "diagnostics": {
1318 "inline": {
1319 "enabled": true,
1320 "min_column": 80
1321 }
1322 }
1323}
1324```
1325
13265. Show only warning and error diagnostics.
1327
1328```json
1329{
1330 "diagnostics": {
1331 "inline": {
1332 "enabled": true,
1333 "max_severity": "warning"
1334 }
1335 }
1336}
1337```
1338
1339## Git
1340
1341- Description: Configuration for git-related features.
1342- Setting: `git`
1343- Default:
1344
1345```json
1346{
1347 "git": {
1348 "git_gutter": "tracked_files",
1349 "inline_blame": {
1350 "enabled": true
1351 },
1352 "hunk_style": "staged_hollow"
1353 }
1354}
1355```
1356
1357### Git Gutter
1358
1359- Description: Whether or not to show the git gutter.
1360- Setting: `git_gutter`
1361- Default: `tracked_files`
1362
1363**Options**
1364
13651. Show git gutter in tracked files
1366
1367```json
1368{
1369 "git": {
1370 "git_gutter": "tracked_files"
1371 }
1372}
1373```
1374
13752. Hide git gutter
1376
1377```json
1378{
1379 "git": {
1380 "git_gutter": "hide"
1381 }
1382}
1383```
1384
1385### Gutter Debounce
1386
1387- Description: Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
1388- Setting: `gutter_debounce`
1389- Default: `null`
1390
1391**Options**
1392
1393`integer` values representing milliseconds
1394
1395Example:
1396
1397```json
1398{
1399 "git": {
1400 "gutter_debounce": 100
1401 }
1402}
1403```
1404
1405### Inline Git Blame
1406
1407- Description: Whether or not to show git blame information inline, on the currently focused line.
1408- Setting: `inline_blame`
1409- Default:
1410
1411```json
1412{
1413 "git": {
1414 "inline_blame": {
1415 "enabled": true
1416 }
1417 }
1418}
1419```
1420
1421### Hunk Style
1422
1423- Description: What styling we should use for the diff hunks.
1424- Setting: `hunk_style`
1425- Default:
1426
1427```json
1428{
1429 "git": {
1430 "hunk_style": "staged_hollow"
1431 }
1432}
1433```
1434
1435**Options**
1436
14371. Show the staged hunks faded out and with a border:
1438
1439```json
1440{
1441 "git": {
1442 "hunk_style": "staged_hollow"
1443 }
1444}
1445```
1446
14472. Show unstaged hunks faded out and with a border:
1448
1449```json
1450{
1451 "git": {
1452 "hunk_style": "unstaged_hollow"
1453 }
1454}
1455```
1456
1457**Options**
1458
14591. Disable inline git blame:
1460
1461```json
1462{
1463 "git": {
1464 "inline_blame": {
1465 "enabled": false
1466 }
1467 }
1468}
1469```
1470
14712. Only show inline git blame after a delay (that starts after cursor stops moving):
1472
1473```json
1474{
1475 "git": {
1476 "inline_blame": {
1477 "enabled": true,
1478 "delay_ms": 500
1479 }
1480 }
1481}
1482```
1483
14843. Show a commit summary next to the commit date and author:
1485
1486```json
1487{
1488 "git": {
1489 "inline_blame": {
1490 "enabled": true,
1491 "show_commit_summary": true
1492 }
1493 }
1494}
1495```
1496
14974. Use this as the minimum column at which to display inline blame information:
1498
1499```json
1500{
1501 "git": {
1502 "inline_blame": {
1503 "enabled": true,
1504 "min_column": 80
1505 }
1506 }
1507}
1508```
1509
1510## Indent Guides
1511
1512- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1513- Setting: `indent_guides`
1514- Default:
1515
1516```json
1517{
1518 "indent_guides": {
1519 "enabled": true,
1520 "line_width": 1,
1521 "active_line_width": 1,
1522 "coloring": "fixed",
1523 "background_coloring": "disabled"
1524 }
1525}
1526```
1527
1528**Options**
1529
15301. Disable indent guides
1531
1532```json
1533{
1534 "indent_guides": {
1535 "enabled": false
1536 }
1537}
1538```
1539
15402. Enable indent guides for a specific language.
1541
1542```json
1543{
1544 "languages": {
1545 "Python": {
1546 "indent_guides": {
1547 "enabled": true
1548 }
1549 }
1550 }
1551}
1552```
1553
15543. Enable indent aware coloring ("rainbow indentation").
1555 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.
1556
1557```json
1558{
1559 "indent_guides": {
1560 "enabled": true,
1561 "coloring": "indent_aware"
1562 }
1563}
1564```
1565
15664. Enable indent aware background coloring ("rainbow indentation").
1567 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.
1568
1569```json
1570{
1571 "indent_guides": {
1572 "enabled": true,
1573 "coloring": "indent_aware",
1574 "background_coloring": "indent_aware"
1575 }
1576}
1577```
1578
1579## Hard Tabs
1580
1581- Description: Whether to indent lines using tab characters or multiple spaces.
1582- Setting: `hard_tabs`
1583- Default: `false`
1584
1585**Options**
1586
1587`boolean` values
1588
1589## Hover Popover Enabled
1590
1591- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1592- Setting: `hover_popover_enabled`
1593- Default: `true`
1594
1595**Options**
1596
1597`boolean` values
1598
1599## Icon Theme
1600
1601- 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.
1602- Setting: `icon_theme`
1603- Default: `Zed (Default)`
1604
1605### Icon Theme Object
1606
1607- Description: Specify the icon theme using an object that includes the `mode`, `dark`, and `light`.
1608- Setting: `icon_theme`
1609- Default:
1610
1611```json
1612"icon_theme": {
1613 "mode": "system",
1614 "dark": "Zed (Default)",
1615 "light": "Zed (Default)"
1616},
1617```
1618
1619### Mode
1620
1621- Description: Specify the icon theme mode.
1622- Setting: `mode`
1623- Default: `system`
1624
1625**Options**
1626
16271. Set the icon theme to dark mode
1628
1629```json
1630{
1631 "mode": "dark"
1632}
1633```
1634
16352. Set the icon theme to light mode
1636
1637```json
1638{
1639 "mode": "light"
1640}
1641```
1642
16433. Set the icon theme to system mode
1644
1645```json
1646{
1647 "mode": "system"
1648}
1649```
1650
1651### Dark
1652
1653- Description: The name of the dark icon theme.
1654- Setting: `dark`
1655- Default: `Zed (Default)`
1656
1657**Options**
1658
1659Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
1660
1661### Light
1662
1663- Description: The name of the light icon theme.
1664- Setting: `light`
1665- Default: `Zed (Default)`
1666
1667**Options**
1668
1669Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
1670
1671## Inlay hints
1672
1673- Description: Configuration for displaying extra text with hints in the editor.
1674- Setting: `inlay_hints`
1675- Default:
1676
1677```json
1678"inlay_hints": {
1679 "enabled": false,
1680 "show_type_hints": true,
1681 "show_parameter_hints": true,
1682 "show_other_hints": true,
1683 "show_background": false,
1684 "edit_debounce_ms": 700,
1685 "scroll_debounce_ms": 50,
1686 "toggle_on_modifiers_press": null
1687}
1688```
1689
1690**Options**
1691
1692Inlay hints querying consists of two parts: editor (client) and LSP server.
1693With 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.
1694At 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.
1695
1696The following languages have inlay hints preconfigured by Zed:
1697
1698- [Go](https://docs.zed.dev/languages/go)
1699- [Rust](https://docs.zed.dev/languages/rust)
1700- [Svelte](https://docs.zed.dev/languages/svelte)
1701- [Typescript](https://docs.zed.dev/languages/typescript)
1702
1703Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
1704
1705Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
1706Settings-related hint updates are not debounced.
1707
1708All possible config values for `toggle_on_modifiers_press` are:
1709
1710```json
1711"inlay_hints": {
1712 "toggle_on_modifiers_press": {
1713 "control": true,
1714 "shift": true,
1715 "alt": true,
1716 "platform": true,
1717 "function": true
1718 }
1719}
1720```
1721
1722Unspecified values have a `false` value, hints won't be toggled if all the modifiers are `false` or not all the modifiers are pressed.
1723
1724## Journal
1725
1726- Description: Configuration for the journal.
1727- Setting: `journal`
1728- Default:
1729
1730```json
1731"journal": {
1732 "path": "~",
1733 "hour_format": "hour12"
1734}
1735```
1736
1737### Path
1738
1739- Description: The path of the directory where journal entries are stored.
1740- Setting: `path`
1741- Default: `~`
1742
1743**Options**
1744
1745`string` values
1746
1747### Hour Format
1748
1749- Description: The format to use for displaying hours in the journal.
1750- Setting: `hour_format`
1751- Default: `hour12`
1752
1753**Options**
1754
17551. 12-hour format:
1756
1757```json
1758{
1759 "hour_format": "hour12"
1760}
1761```
1762
17632. 24-hour format:
1764
1765```json
1766{
1767 "hour_format": "hour24"
1768}
1769```
1770
1771## Languages
1772
1773- Description: Configuration for specific languages.
1774- Setting: `languages`
1775- Default: `null`
1776
1777**Options**
1778
1779To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1780
1781```json
1782"languages": {
1783 "C": {
1784 "format_on_save": "off",
1785 "preferred_line_length": 64,
1786 "soft_wrap": "preferred_line_length"
1787 },
1788 "JSON": {
1789 "tab_size": 4
1790 }
1791}
1792```
1793
1794The following settings can be overridden for each specific language:
1795
1796- [`enable_language_server`](#enable-language-server)
1797- [`ensure_final_newline_on_save`](#ensure-final-newline-on-save)
1798- [`format_on_save`](#format-on-save)
1799- [`formatter`](#formatter)
1800- [`hard_tabs`](#hard-tabs)
1801- [`preferred_line_length`](#preferred-line-length)
1802- [`remove_trailing_whitespace_on_save`](#remove-trailing-whitespace-on-save)
1803- [`show_edit_predictions`](#show-edit-predictions)
1804- [`show_whitespaces`](#show-whitespaces)
1805- [`soft_wrap`](#soft-wrap)
1806- [`tab_size`](#tab-size)
1807- [`use_autoclose`](#use-autoclose)
1808- [`always_treat_brackets_as_autoclosed`](#always-treat-brackets-as-autoclosed)
1809
1810These values take in the same options as the root-level settings with the same name.
1811
1812## Network Proxy
1813
1814- Description: Configure a network proxy for Zed.
1815- Setting: `proxy`
1816- Default: `null`
1817
1818**Options**
1819
1820The proxy setting must contain a URL to the proxy.
1821
1822The following URI schemes are supported:
1823
1824- `http`
1825- `https`
1826- `socks4` - SOCKS4 proxy with local DNS
1827- `socks4a` - SOCKS4 proxy with remote DNS
1828- `socks5` - SOCKS5 proxy with local DNS
1829- `socks5h` - SOCKS5 proxy with remote DNS
1830
1831`http` will be used when no scheme is specified.
1832
1833By 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`.
1834
1835For example, to set an `http` proxy, add the following to your settings:
1836
1837```json
1838{
1839 "proxy": "http://127.0.0.1:10809"
1840}
1841```
1842
1843Or to set a `socks5` proxy:
1844
1845```json
1846{
1847 "proxy": "socks5h://localhost:10808"
1848}
1849```
1850
1851## Preview tabs
1852
1853- Description:
1854 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. \
1855 There are several ways to convert a preview tab into a regular tab:
1856
1857 - Double-clicking on the file
1858 - Double-clicking on the tab header
1859 - Using the `project_panel::OpenPermanent` action
1860 - Editing the file
1861 - Dragging the file to a different pane
1862
1863- Setting: `preview_tabs`
1864- Default:
1865
1866```json
1867"preview_tabs": {
1868 "enabled": true,
1869 "enable_preview_from_file_finder": false,
1870 "enable_preview_from_code_navigation": false,
1871}
1872```
1873
1874### Enable preview from file finder
1875
1876- Description: Determines whether to open files in preview mode when selected from the file finder.
1877- Setting: `enable_preview_from_file_finder`
1878- Default: `false`
1879
1880**Options**
1881
1882`boolean` values
1883
1884### Enable preview from code navigation
1885
1886- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1887- Setting: `enable_preview_from_code_navigation`
1888- Default: `false`
1889
1890**Options**
1891
1892`boolean` values
1893
1894## File Finder
1895
1896### Modal Max Width
1897
1898- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
1899- Setting: `modal_max_width`
1900- Default: `small`
1901
1902## Preferred Line Length
1903
1904- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1905- Setting: `preferred_line_length`
1906- Default: `80`
1907
1908**Options**
1909
1910`integer` values
1911
1912## Projects Online By Default
1913
1914- Description: Whether or not to show the online projects view by default.
1915- Setting: `projects_online_by_default`
1916- Default: `true`
1917
1918**Options**
1919
1920`boolean` values
1921
1922## Remove Trailing Whitespace On Save
1923
1924- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1925- Setting: `remove_trailing_whitespace_on_save`
1926- Default: `true`
1927
1928**Options**
1929
1930`boolean` values
1931
1932## Search
1933
1934- Description: Search options to enable by default when opening new project and buffer searches.
1935- Setting: `search`
1936- Default:
1937
1938```json
1939"search": {
1940 "whole_word": false,
1941 "case_sensitive": false,
1942 "include_ignored": false,
1943 "regex": false
1944},
1945```
1946
1947## Seed Search Query From Cursor
1948
1949- Description: When to populate a new search's query based on the text under the cursor.
1950- Setting: `seed_search_query_from_cursor`
1951- Default: `always`
1952
1953**Options**
1954
19551. `always` always populate the search query with the word under the cursor
19562. `selection` only populate the search query when there is text selected
19573. `never` never populate the search query
1958
1959## Use Smartcase Search
1960
1961- 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. \
1962 This applies to both in-file searches and project-wide searches.
1963
1964 Examples:
1965
1966 - Searching for "function" would match "function", "Function", "FUNCTION", etc.
1967 - Searching for "Function" would only match "Function", not "function" or "FUNCTION"
1968
1969- Setting: `use_smartcase_search`
1970- Default: `false`
1971
1972**Options**
1973
1974`boolean` values
1975
1976## Show Call Status Icon
1977
1978- Description: Whether or not to show the call status icon in the status bar.
1979- Setting: `show_call_status_icon`
1980- Default: `true`
1981
1982**Options**
1983
1984`boolean` values
1985
1986## Show Completions On Input
1987
1988- Description: Whether or not to show completions as you type.
1989- Setting: `show_completions_on_input`
1990- Default: `true`
1991
1992**Options**
1993
1994`boolean` values
1995
1996## Show Completion Documentation
1997
1998- Description: Whether to display inline and alongside documentation for items in the completions menu.
1999- Setting: `show_completion_documentation`
2000- Default: `true`
2001
2002**Options**
2003
2004`boolean` values
2005
2006## Show Edit Predictions
2007
2008- Description: Whether to show edit predictions as you type or manually by triggering `editor::ShowEditPrediction`.
2009- Setting: `show_edit_predictions`
2010- Default: `true`
2011
2012**Options**
2013
2014`boolean` values
2015
2016## Show Whitespaces
2017
2018- Description: Whether or not to show render whitespace characters in the editor.
2019- Setting: `show_whitespaces`
2020- Default: `selection`
2021
2022**Options**
2023
20241. `all`
20252. `selection`
20263. `none`
20274. `boundary`
2028
2029## Soft Wrap
2030
2031- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
2032- Setting: `soft_wrap`
2033- Default: `none`
2034
2035**Options**
2036
20371. `none` to avoid wrapping generally, unless the line is too long
20382. `prefer_line` (deprecated, same as `none`)
20393. `editor_width` to wrap lines that overflow the editor width
20404. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
20415. `bounded` to wrap lines at the minimum of `editor_width` and `preferred_line_length`
2042
2043## Wrap Guides (Vertical Rulers)
2044
2045- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
2046- Setting: `wrap_guides`
2047- Default: []
2048
2049**Options**
2050
2051List of `integer` column numbers
2052
2053## Tab Size
2054
2055- Description: The number of spaces to use for each tab character.
2056- Setting: `tab_size`
2057- Default: `4`
2058
2059**Options**
2060
2061`integer` values
2062
2063## Telemetry
2064
2065- Description: Control what info is collected by Zed.
2066- Setting: `telemetry`
2067- Default:
2068
2069```json
2070"telemetry": {
2071 "diagnostics": true,
2072 "metrics": true
2073},
2074```
2075
2076**Options**
2077
2078### Diagnostics
2079
2080- Description: Setting for sending debug-related data, such as crash reports.
2081- Setting: `diagnostics`
2082- Default: `true`
2083
2084**Options**
2085
2086`boolean` values
2087
2088### Metrics
2089
2090- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
2091- Setting: `metrics`
2092- Default: `true`
2093
2094**Options**
2095
2096`boolean` values
2097
2098## Terminal
2099
2100- Description: Configuration for the terminal.
2101- Setting: `terminal`
2102- Default:
2103
2104```json
2105{
2106 "terminal": {
2107 "alternate_scroll": "off",
2108 "blinking": "terminal_controlled",
2109 "copy_on_select": false,
2110 "dock": "bottom",
2111 "detect_venv": {
2112 "on": {
2113 "directories": [".env", "env", ".venv", "venv"],
2114 "activate_script": "default"
2115 }
2116 },
2117 "env": {},
2118 "font_family": null,
2119 "font_features": null,
2120 "font_size": null,
2121 "line_height": "comfortable",
2122 "option_as_meta": false,
2123 "button": false,
2124 "shell": {},
2125 "toolbar": {
2126 "breadcrumbs": true
2127 },
2128 "working_directory": "current_project_directory",
2129 "scrollbar": {
2130 "show": null
2131 }
2132 }
2133}
2134```
2135
2136### Terminal: Dock
2137
2138- Description: Control the position of the dock
2139- Setting: `dock`
2140- Default: `bottom`
2141
2142**Options**
2143
2144`"bottom"`, `"left"` or `"right"`
2145
2146### Terminal: Alternate Scroll
2147
2148- 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.
2149- Setting: `alternate_scroll`
2150- Default: `off`
2151
2152**Options**
2153
21541. Default alternate scroll mode to on
2155
2156```json
2157{
2158 "terminal": {
2159 "alternate_scroll": "on"
2160 }
2161}
2162```
2163
21642. Default alternate scroll mode to off
2165
2166```json
2167{
2168 "terminal": {
2169 "alternate_scroll": "off"
2170 }
2171}
2172```
2173
2174### Terminal: Blinking
2175
2176- Description: Set the cursor blinking behavior in the terminal
2177- Setting: `blinking`
2178- Default: `terminal_controlled`
2179
2180**Options**
2181
21821. Never blink the cursor, ignore the terminal mode
2183
2184```json
2185{
2186 "terminal": {
2187 "blinking": "off"
2188 }
2189}
2190```
2191
21922. Default the cursor blink to off, but allow the terminal to turn blinking on
2193
2194```json
2195{
2196 "terminal": {
2197 "blinking": "terminal_controlled"
2198 }
2199}
2200```
2201
22023. Always blink the cursor, ignore the terminal mode
2203
2204```json
2205{
2206 "terminal": {
2207 "blinking": "on"
2208 }
2209}
2210```
2211
2212### Terminal: Copy On Select
2213
2214- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
2215- Setting: `copy_on_select`
2216- Default: `false`
2217
2218**Options**
2219
2220`boolean` values
2221
2222**Example**
2223
2224```json
2225{
2226 "terminal": {
2227 "copy_on_select": true
2228 }
2229}
2230```
2231
2232### Terminal: Env
2233
2234- 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
2235- Setting: `env`
2236- Default: `{}`
2237
2238**Example**
2239
2240```json
2241{
2242 "terminal": {
2243 "env": {
2244 "ZED": "1",
2245 "KEY": "value1:value2"
2246 }
2247 }
2248}
2249```
2250
2251### Terminal: Font Size
2252
2253- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
2254- Setting: `font_size`
2255- Default: `null`
2256
2257**Options**
2258
2259`integer` values
2260
2261```json
2262{
2263 "terminal": {
2264 "font_size": 15
2265 }
2266}
2267```
2268
2269### Terminal: Font Family
2270
2271- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
2272- Setting: `font_family`
2273- Default: `null`
2274
2275**Options**
2276
2277The name of any font family installed on the user's system
2278
2279```json
2280{
2281 "terminal": {
2282 "font_family": "Berkeley Mono"
2283 }
2284}
2285```
2286
2287### Terminal: Font Features
2288
2289- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
2290- Setting: `font_features`
2291- Default: `null`
2292- Platform: macOS and Windows.
2293
2294**Options**
2295
2296See Buffer Font Features
2297
2298```json
2299{
2300 "terminal": {
2301 "font_features": {
2302 "calt": false
2303 // See Buffer Font Features for more features
2304 }
2305 }
2306}
2307```
2308
2309### Terminal: Line Height
2310
2311- Description: Set the terminal's line height.
2312- Setting: `line_height`
2313- Default: `comfortable`
2314
2315**Options**
2316
23171. Use a line height that's `comfortable` for reading, 1.618. (default)
2318
2319```json
2320{
2321 "terminal": {
2322 "line_height": "comfortable"
2323 }
2324}
2325```
2326
23272. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
2328
2329```json
2330{
2331 "terminal": {
2332 "line_height": "standard"
2333 }
2334}
2335```
2336
23373. Use a custom line height.
2338
2339```json
2340{
2341 "terminal": {
2342 "line_height": {
2343 "custom": 2
2344 }
2345 }
2346}
2347```
2348
2349### Terminal: Option As Meta
2350
2351- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
2352- Setting: `option_as_meta`
2353- Default: `false`
2354
2355**Options**
2356
2357`boolean` values
2358
2359```json
2360{
2361 "terminal": {
2362 "option_as_meta": true
2363 }
2364}
2365```
2366
2367### Terminal: Shell
2368
2369- Description: What shell to use when launching the terminal.
2370- Setting: `shell`
2371- Default: `system`
2372
2373**Options**
2374
23751. Use the system's default terminal configuration (usually the `/etc/passwd` file).
2376
2377```json
2378{
2379 "terminal": {
2380 "shell": "system"
2381 }
2382}
2383```
2384
23852. A program to launch:
2386
2387```json
2388{
2389 "terminal": {
2390 "shell": {
2391 "program": "sh"
2392 }
2393 }
2394}
2395```
2396
23973. A program with arguments:
2398
2399```json
2400{
2401 "terminal": {
2402 "shell": {
2403 "with_arguments": {
2404 "program": "/bin/bash",
2405 "args": ["--login"]
2406 }
2407 }
2408 }
2409}
2410```
2411
2412## Terminal: Detect Virtual Environments {#terminal-detect_venv}
2413
2414- 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.
2415- Setting: `detect_venv`
2416- Default:
2417
2418```json
2419{
2420 "terminal": {
2421 "detect_venv": {
2422 "on": {
2423 // Default directories to search for virtual environments, relative
2424 // to the current working directory. We recommend overriding this
2425 // in your project's settings, rather than globally.
2426 "directories": [".venv", "venv"],
2427 // Can also be `csh`, `fish`, and `nushell`
2428 "activate_script": "default"
2429 }
2430 }
2431 }
2432}
2433```
2434
2435Disable with:
2436
2437```json
2438{
2439 "terminal": {
2440 "detect_venv": "off"
2441 }
2442}
2443```
2444
2445## Terminal: Toolbar
2446
2447- Description: Whether or not to show various elements in the terminal toolbar.
2448- Setting: `toolbar`
2449- Default:
2450
2451```json
2452{
2453 "terminal": {
2454 "toolbar": {
2455 "breadcrumbs": true
2456 }
2457 }
2458}
2459```
2460
2461**Options**
2462
2463At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
2464
2465If the terminal title is empty, the breadcrumbs won't be shown.
2466
2467The shell running in the terminal needs to be configured to emit the title.
2468
2469Example command to set the title: `echo -e "\e]2;New Title\007";`
2470
2471### Terminal: Button
2472
2473- Description: Control to show or hide the terminal button in the status bar
2474- Setting: `button`
2475- Default: `true`
2476
2477**Options**
2478
2479`boolean` values
2480
2481```json
2482{
2483 "terminal": {
2484 "button": false
2485 }
2486}
2487```
2488
2489### Terminal: Working Directory
2490
2491- Description: What working directory to use when launching the terminal.
2492- Setting: `working_directory`
2493- Default: `"current_project_directory"`
2494
2495**Options**
2496
24971. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2498
2499```json
2500{
2501 "terminal": {
2502 "working_directory": "current_project_directory"
2503 }
2504}
2505```
2506
25072. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2508
2509```json
2510{
2511 "terminal": {
2512 "working_directory": "first_project_directory"
2513 }
2514}
2515```
2516
25173. Always use this platform's home directory (if we can find it)
2518
2519```json
2520{
2521 "terminal": {
2522 "working_directory": "always_home"
2523 }
2524}
2525```
2526
25274. 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.
2528
2529```json
2530{
2531 "terminal": {
2532 "working_directory": {
2533 "always": {
2534 "directory": "~/zed/projects/"
2535 }
2536 }
2537 }
2538}
2539```
2540
2541## Theme
2542
2543- 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.
2544- Setting: `theme`
2545- Default: `One Dark`
2546
2547### Theme Object
2548
2549- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
2550- Setting: `theme`
2551- Default:
2552
2553```json
2554"theme": {
2555 "mode": "system",
2556 "dark": "One Dark",
2557 "light": "One Light"
2558},
2559```
2560
2561### Mode
2562
2563- Description: Specify theme mode.
2564- Setting: `mode`
2565- Default: `system`
2566
2567**Options**
2568
25691. Set the theme to dark mode
2570
2571```json
2572{
2573 "mode": "dark"
2574}
2575```
2576
25772. Set the theme to light mode
2578
2579```json
2580{
2581 "mode": "light"
2582}
2583```
2584
25853. Set the theme to system mode
2586
2587```json
2588{
2589 "mode": "system"
2590}
2591```
2592
2593### Dark
2594
2595- Description: The name of the dark Zed theme to use for the UI.
2596- Setting: `dark`
2597- Default: `One Dark`
2598
2599**Options**
2600
2601Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2602
2603### Light
2604
2605- Description: The name of the light Zed theme to use for the UI.
2606- Setting: `light`
2607- Default: `One Light`
2608
2609**Options**
2610
2611Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2612
2613## Vim
2614
2615- Description: Whether or not to enable vim mode (work in progress).
2616- Setting: `vim_mode`
2617- Default: `false`
2618
2619## Project Panel
2620
2621- Description: Customize project panel
2622- Setting: `project_panel`
2623- Default:
2624
2625```json
2626{
2627 "project_panel": {
2628 "button": true,
2629 "default_width": 240,
2630 "dock": "left",
2631 "entry_spacing": "comfortable",
2632 "file_icons": true,
2633 "folder_icons": true,
2634 "git_status": true,
2635 "indent_size": 20,
2636 "auto_reveal_entries": true,
2637 "auto_fold_dirs": true,
2638 "scrollbar": {
2639 "show": null
2640 },
2641 "indent_guides": {
2642 "show": "always"
2643 }
2644 }
2645}
2646```
2647
2648### Dock
2649
2650- Description: Control the position of the dock
2651- Setting: `dock`
2652- Default: `left`
2653
2654**Options**
2655
26561. Default dock position to left
2657
2658```json
2659{
2660 "dock": "left"
2661}
2662```
2663
26642. Default dock position to right
2665
2666```json
2667{
2668 "dock": "right"
2669}
2670```
2671
2672### Entry Spacing
2673
2674- Description: Spacing between worktree entries
2675- Setting: `entry_spacing`
2676- Default: `comfortable`
2677
2678**Options**
2679
26801. Comfortable entry spacing
2681
2682```json
2683{
2684 "entry_spacing": "comfortable"
2685}
2686```
2687
26882. Standard entry spacing
2689
2690```json
2691{
2692 "entry_spacing": "standard"
2693}
2694```
2695
2696### Git Status
2697
2698- Description: Indicates newly created and updated files
2699- Setting: `git_status`
2700- Default: `true`
2701
2702**Options**
2703
27041. Default enable git status
2705
2706```json
2707{
2708 "git_status": true
2709}
2710```
2711
27122. Default disable git status
2713
2714```json
2715{
2716 "git_status": false
2717}
2718```
2719
2720### Default Width
2721
2722- Description: Customize default width taken by project panel
2723- Setting: `default_width`
2724- Default: N/A width in pixels (eg: 420)
2725
2726**Options**
2727
2728`boolean` values
2729
2730### Auto Reveal Entries
2731
2732- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
2733- Setting: `auto_reveal_entries`
2734- Default: `true`
2735
2736**Options**
2737
27381. Enable auto reveal entries
2739
2740```json
2741{
2742 "auto_reveal_entries": true
2743}
2744```
2745
27462. Disable auto reveal entries
2747
2748```json
2749{
2750 "auto_reveal_entries": false
2751}
2752```
2753
2754### Auto Fold Dirs
2755
2756- Description: Whether to fold directories automatically when directory has only one directory inside.
2757- Setting: `auto_fold_dirs`
2758- Default: `true`
2759
2760**Options**
2761
27621. Enable auto fold dirs
2763
2764```json
2765{
2766 "auto_fold_dirs": true
2767}
2768```
2769
27702. Disable auto fold dirs
2771
2772```json
2773{
2774 "auto_fold_dirs": false
2775}
2776```
2777
2778### Indent Size
2779
2780- Description: Amount of indentation (in pixels) for nested items.
2781- Setting: `indent_size`
2782- Default: `20`
2783
2784### Indent Guides: Show
2785
2786- Description: Whether to show indent guides in the project panel. Possible values: "always", "never".
2787- Setting: `indent_guides`
2788
2789```json
2790"indent_guides": {
2791 "show": "always"
2792}
2793```
2794
2795**Options**
2796
27971. Show indent guides in the project panel
2798
2799```json
2800{
2801 "indent_guides": {
2802 "show": "always"
2803 }
2804}
2805```
2806
28072. Hide indent guides in the project panel
2808
2809```json
2810{
2811 "indent_guides": {
2812 "show": "never"
2813 }
2814}
2815```
2816
2817### Scrollbar: Show
2818
2819- 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.
2820- Setting: `scrollbar`
2821- Default:
2822
2823```json
2824"scrollbar": {
2825 "show": null
2826}
2827```
2828
2829**Options**
2830
28311. Show scrollbar in the project panel
2832
2833```json
2834{
2835 "scrollbar": {
2836 "show": "always"
2837 }
2838}
2839```
2840
28412. Hide scrollbar in the project panel
2842
2843```json
2844{
2845 "scrollbar": {
2846 "show": "never"
2847 }
2848}
2849```
2850
2851## Assistant Panel
2852
2853- Description: Customize assistant panel
2854- Setting: `assistant`
2855- Default:
2856
2857```json
2858"assistant": {
2859 "enabled": true,
2860 "button": true,
2861 "dock": "right",
2862 "default_width": 640,
2863 "default_height": 320,
2864 "provider": "openai",
2865 "version": "1",
2866},
2867```
2868
2869## Outline Panel
2870
2871- Description: Customize outline Panel
2872- Setting: `outline_panel`
2873- Default:
2874
2875```json
2876"outline_panel": {
2877 "button": true,
2878 "default_width": 240,
2879 "dock": "left",
2880 "file_icons": true,
2881 "folder_icons": true,
2882 "git_status": true,
2883 "indent_size": 20,
2884 "auto_reveal_entries": true,
2885 "auto_fold_dirs": true,
2886 "indent_guides": {
2887 "show": "always"
2888 },
2889 "scrollbar": {
2890 "show": null
2891 }
2892}
2893```
2894
2895## Calls
2896
2897- Description: Customize behavior when participating in a call
2898- Setting: `calls`
2899- Default:
2900
2901```json
2902"calls": {
2903 // Join calls with the microphone live by default
2904 "mute_on_join": false,
2905 // Share your project when you are the first to join a channel
2906 "share_on_join": false
2907},
2908```
2909
2910## Unnecessary Code Fade
2911
2912- Description: How much to fade out unused code.
2913- Setting: `unnecessary_code_fade`
2914- Default: `0.3`
2915
2916**Options**
2917
2918Float values between `0.0` and `0.9`, where:
2919
2920- `0.0` means no fading (unused code looks the same as used code)
2921- `0.9` means maximum fading (unused code is very faint but still visible)
2922
2923**Example**
2924
2925```json
2926{
2927 "unnecessary_code_fade": 0.5
2928}
2929```
2930
2931## UI Font Family
2932
2933- Description: The name of the font to use for text in the UI.
2934- Setting: `ui_font_family`
2935- Default: `Zed Plex Sans`
2936
2937**Options**
2938
2939The name of any font family installed on the system.
2940
2941## UI Font Features
2942
2943- Description: The OpenType features to enable for text in the UI.
2944- Setting: `ui_font_features`
2945- Default: `null`
2946- Platform: macOS and Windows.
2947
2948**Options**
2949
2950Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
2951
2952For example, to disable font ligatures, add the following to your settings:
2953
2954```json
2955{
2956 "ui_font_features": {
2957 "calt": false
2958 }
2959}
2960```
2961
2962You can also set other OpenType features, like setting `cv01` to `7`:
2963
2964```json
2965{
2966 "ui_font_features": {
2967 "cv01": 7
2968 }
2969}
2970```
2971
2972## UI Font Fallbacks
2973
2974- Description: The font fallbacks to use for text in the UI.
2975- Setting: `ui_font_fallbacks`
2976- Default: `null`
2977- Platform: macOS and Windows.
2978
2979**Options**
2980
2981For example, to use `Nerd Font` as a fallback, add the following to your settings:
2982
2983```json
2984{
2985 "ui_font_fallbacks": ["Nerd Font"]
2986}
2987```
2988
2989## UI Font Size
2990
2991- Description: The default font size for text in the UI.
2992- Setting: `ui_font_size`
2993- Default: `16`
2994
2995**Options**
2996
2997`integer` values from `6` to `100` pixels (inclusive)
2998
2999## UI Font Weight
3000
3001- Description: The default font weight for text in the UI.
3002- Setting: `ui_font_weight`
3003- Default: `400`
3004
3005**Options**
3006
3007`integer` values between `100` and `900`
3008
3009## An example configuration:
3010
3011```json
3012// ~/.config/zed/settings.json
3013{
3014 "theme": "cave-light",
3015 "tab_size": 2,
3016 "preferred_line_length": 80,
3017 "soft_wrap": "none",
3018
3019 "buffer_font_size": 18,
3020 "buffer_font_family": "Zed Plex Mono",
3021
3022 "autosave": "on_focus_change",
3023 "format_on_save": "off",
3024 "vim_mode": false,
3025 "projects_online_by_default": true,
3026 "terminal": {
3027 "font_family": "FiraCode Nerd Font Mono",
3028 "blinking": "off"
3029 },
3030 "languages": {
3031 "C": {
3032 "format_on_save": "language_server",
3033 "preferred_line_length": 64,
3034 "soft_wrap": "preferred_line_length"
3035 }
3036 }
3037}
3038```