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 }
1353}
1354```
1355
1356### Git Gutter
1357
1358- Description: Whether or not to show the git gutter.
1359- Setting: `git_gutter`
1360- Default: `tracked_files`
1361
1362**Options**
1363
13641. Show git gutter in tracked files
1365
1366```json
1367{
1368 "git": {
1369 "git_gutter": "tracked_files"
1370 }
1371}
1372```
1373
13742. Hide git gutter
1375
1376```json
1377{
1378 "git": {
1379 "git_gutter": "hide"
1380 }
1381}
1382```
1383
1384### Inline Git Blame
1385
1386- Description: Whether or not to show git blame information inline, on the currently focused line.
1387- Setting: `inline_blame`
1388- Default:
1389
1390```json
1391{
1392 "git": {
1393 "inline_blame": {
1394 "enabled": true
1395 }
1396 }
1397}
1398```
1399
1400**Options**
1401
14021. Disable inline git blame:
1403
1404```json
1405{
1406 "git": {
1407 "inline_blame": {
1408 "enabled": false
1409 }
1410 }
1411}
1412```
1413
14142. Only show inline git blame after a delay (that starts after cursor stops moving):
1415
1416```json
1417{
1418 "git": {
1419 "inline_blame": {
1420 "enabled": true,
1421 "delay_ms": 500
1422 }
1423 }
1424}
1425```
1426
14273. Show a commit summary next to the commit date and author:
1428
1429```json
1430{
1431 "git": {
1432 "inline_blame": {
1433 "enabled": true,
1434 "show_commit_summary": true
1435 }
1436 }
1437}
1438```
1439
14404. Use this as the minimum column at which to display inline blame information:
1441
1442```json
1443{
1444 "git": {
1445 "inline_blame": {
1446 "enabled": true,
1447 "min_column": 80
1448 }
1449 }
1450}
1451```
1452
1453## Indent Guides
1454
1455- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1456- Setting: `indent_guides`
1457- Default:
1458
1459```json
1460{
1461 "indent_guides": {
1462 "enabled": true,
1463 "line_width": 1,
1464 "active_line_width": 1,
1465 "coloring": "fixed",
1466 "background_coloring": "disabled"
1467 }
1468}
1469```
1470
1471**Options**
1472
14731. Disable indent guides
1474
1475```json
1476{
1477 "indent_guides": {
1478 "enabled": false
1479 }
1480}
1481```
1482
14832. Enable indent guides for a specific language.
1484
1485```json
1486{
1487 "languages": {
1488 "Python": {
1489 "indent_guides": {
1490 "enabled": true
1491 }
1492 }
1493 }
1494}
1495```
1496
14973. Enable indent aware coloring ("rainbow indentation").
1498 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.
1499
1500```json
1501{
1502 "indent_guides": {
1503 "enabled": true,
1504 "coloring": "indent_aware"
1505 }
1506}
1507```
1508
15094. Enable indent aware background coloring ("rainbow indentation").
1510 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.
1511
1512```json
1513{
1514 "indent_guides": {
1515 "enabled": true,
1516 "coloring": "indent_aware",
1517 "background_coloring": "indent_aware"
1518 }
1519}
1520```
1521
1522## Hard Tabs
1523
1524- Description: Whether to indent lines using tab characters or multiple spaces.
1525- Setting: `hard_tabs`
1526- Default: `false`
1527
1528**Options**
1529
1530`boolean` values
1531
1532## Hover Popover Enabled
1533
1534- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1535- Setting: `hover_popover_enabled`
1536- Default: `true`
1537
1538**Options**
1539
1540`boolean` values
1541
1542## Icon Theme
1543
1544- 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.
1545- Setting: `icon_theme`
1546- Default: `Zed (Default)`
1547
1548### Icon Theme Object
1549
1550- Description: Specify the icon theme using an object that includes the `mode`, `dark`, and `light`.
1551- Setting: `icon_theme`
1552- Default:
1553
1554```json
1555"icon_theme": {
1556 "mode": "system",
1557 "dark": "Zed (Default)",
1558 "light": "Zed (Default)"
1559},
1560```
1561
1562### Mode
1563
1564- Description: Specify the icon theme mode.
1565- Setting: `mode`
1566- Default: `system`
1567
1568**Options**
1569
15701. Set the icon theme to dark mode
1571
1572```json
1573{
1574 "mode": "dark"
1575}
1576```
1577
15782. Set the icon theme to light mode
1579
1580```json
1581{
1582 "mode": "light"
1583}
1584```
1585
15863. Set the icon theme to system mode
1587
1588```json
1589{
1590 "mode": "system"
1591}
1592```
1593
1594### Dark
1595
1596- Description: The name of the dark icon theme.
1597- Setting: `dark`
1598- Default: `Zed (Default)`
1599
1600**Options**
1601
1602Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
1603
1604### Light
1605
1606- Description: The name of the light icon theme.
1607- Setting: `light`
1608- Default: `Zed (Default)`
1609
1610**Options**
1611
1612Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
1613
1614## Inlay hints
1615
1616- Description: Configuration for displaying extra text with hints in the editor.
1617- Setting: `inlay_hints`
1618- Default:
1619
1620```json
1621"inlay_hints": {
1622 "enabled": false,
1623 "show_type_hints": true,
1624 "show_parameter_hints": true,
1625 "show_other_hints": true,
1626 "show_background": false,
1627 "edit_debounce_ms": 700,
1628 "scroll_debounce_ms": 50,
1629 "toggle_on_modifiers_press": null
1630}
1631```
1632
1633**Options**
1634
1635Inlay hints querying consists of two parts: editor (client) and LSP server.
1636With 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.
1637At 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.
1638
1639The following languages have inlay hints preconfigured by Zed:
1640
1641- [Go](https://docs.zed.dev/languages/go)
1642- [Rust](https://docs.zed.dev/languages/rust)
1643- [Svelte](https://docs.zed.dev/languages/svelte)
1644- [Typescript](https://docs.zed.dev/languages/typescript)
1645
1646Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
1647
1648Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
1649Settings-related hint updates are not debounced.
1650
1651All possible config values for `toggle_on_modifiers_press` are:
1652
1653```json
1654"inlay_hints": {
1655 "toggle_on_modifiers_press": {
1656 "control": true,
1657 "shift": true,
1658 "alt": true,
1659 "platform": true,
1660 "function": true
1661 }
1662}
1663```
1664
1665Unspecified values have a `false` value, hints won't be toggled if all the modifiers are `false` or not all the modifiers are pressed.
1666
1667## Journal
1668
1669- Description: Configuration for the journal.
1670- Setting: `journal`
1671- Default:
1672
1673```json
1674"journal": {
1675 "path": "~",
1676 "hour_format": "hour12"
1677}
1678```
1679
1680### Path
1681
1682- Description: The path of the directory where journal entries are stored.
1683- Setting: `path`
1684- Default: `~`
1685
1686**Options**
1687
1688`string` values
1689
1690### Hour Format
1691
1692- Description: The format to use for displaying hours in the journal.
1693- Setting: `hour_format`
1694- Default: `hour12`
1695
1696**Options**
1697
16981. 12-hour format:
1699
1700```json
1701{
1702 "hour_format": "hour12"
1703}
1704```
1705
17062. 24-hour format:
1707
1708```json
1709{
1710 "hour_format": "hour24"
1711}
1712```
1713
1714## Languages
1715
1716- Description: Configuration for specific languages.
1717- Setting: `languages`
1718- Default: `null`
1719
1720**Options**
1721
1722To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1723
1724```json
1725"languages": {
1726 "C": {
1727 "format_on_save": "off",
1728 "preferred_line_length": 64,
1729 "soft_wrap": "preferred_line_length"
1730 },
1731 "JSON": {
1732 "tab_size": 4
1733 }
1734}
1735```
1736
1737The following settings can be overridden for each specific language:
1738
1739- [`enable_language_server`](#enable-language-server)
1740- [`ensure_final_newline_on_save`](#ensure-final-newline-on-save)
1741- [`format_on_save`](#format-on-save)
1742- [`formatter`](#formatter)
1743- [`hard_tabs`](#hard-tabs)
1744- [`preferred_line_length`](#preferred-line-length)
1745- [`remove_trailing_whitespace_on_save`](#remove-trailing-whitespace-on-save)
1746- [`show_edit_predictions`](#show-edit-predictions)
1747- [`show_whitespaces`](#show-whitespaces)
1748- [`soft_wrap`](#soft-wrap)
1749- [`tab_size`](#tab-size)
1750- [`use_autoclose`](#use-autoclose)
1751- [`always_treat_brackets_as_autoclosed`](#always-treat-brackets-as-autoclosed)
1752
1753These values take in the same options as the root-level settings with the same name.
1754
1755## Network Proxy
1756
1757- Description: Configure a network proxy for Zed.
1758- Setting: `proxy`
1759- Default: `null`
1760
1761**Options**
1762
1763The proxy setting must contain a URL to the proxy.
1764
1765The following URI schemes are supported:
1766
1767- `http`
1768- `https`
1769- `socks4` - SOCKS4 proxy with local DNS
1770- `socks4a` - SOCKS4 proxy with remote DNS
1771- `socks5` - SOCKS5 proxy with local DNS
1772- `socks5h` - SOCKS5 proxy with remote DNS
1773
1774`http` will be used when no scheme is specified.
1775
1776By 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`.
1777
1778For example, to set an `http` proxy, add the following to your settings:
1779
1780```json
1781{
1782 "proxy": "http://127.0.0.1:10809"
1783}
1784```
1785
1786Or to set a `socks5` proxy:
1787
1788```json
1789{
1790 "proxy": "socks5h://localhost:10808"
1791}
1792```
1793
1794## Preview tabs
1795
1796- Description:
1797 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. \
1798 There are several ways to convert a preview tab into a regular tab:
1799
1800 - Double-clicking on the file
1801 - Double-clicking on the tab header
1802 - Using the `project_panel::OpenPermanent` action
1803 - Editing the file
1804 - Dragging the file to a different pane
1805
1806- Setting: `preview_tabs`
1807- Default:
1808
1809```json
1810"preview_tabs": {
1811 "enabled": true,
1812 "enable_preview_from_file_finder": false,
1813 "enable_preview_from_code_navigation": false,
1814}
1815```
1816
1817### Enable preview from file finder
1818
1819- Description: Determines whether to open files in preview mode when selected from the file finder.
1820- Setting: `enable_preview_from_file_finder`
1821- Default: `false`
1822
1823**Options**
1824
1825`boolean` values
1826
1827### Enable preview from code navigation
1828
1829- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1830- Setting: `enable_preview_from_code_navigation`
1831- Default: `false`
1832
1833**Options**
1834
1835`boolean` values
1836
1837## File Finder
1838
1839### Modal Max Width
1840
1841- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
1842- Setting: `modal_max_width`
1843- Default: `small`
1844
1845## Preferred Line Length
1846
1847- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1848- Setting: `preferred_line_length`
1849- Default: `80`
1850
1851**Options**
1852
1853`integer` values
1854
1855## Projects Online By Default
1856
1857- Description: Whether or not to show the online projects view by default.
1858- Setting: `projects_online_by_default`
1859- Default: `true`
1860
1861**Options**
1862
1863`boolean` values
1864
1865## Remove Trailing Whitespace On Save
1866
1867- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1868- Setting: `remove_trailing_whitespace_on_save`
1869- Default: `true`
1870
1871**Options**
1872
1873`boolean` values
1874
1875## Search
1876
1877- Description: Search options to enable by default when opening new project and buffer searches.
1878- Setting: `search`
1879- Default:
1880
1881```json
1882"search": {
1883 "whole_word": false,
1884 "case_sensitive": false,
1885 "include_ignored": false,
1886 "regex": false
1887},
1888```
1889
1890## Seed Search Query From Cursor
1891
1892- Description: When to populate a new search's query based on the text under the cursor.
1893- Setting: `seed_search_query_from_cursor`
1894- Default: `always`
1895
1896**Options**
1897
18981. `always` always populate the search query with the word under the cursor
18992. `selection` only populate the search query when there is text selected
19003. `never` never populate the search query
1901
1902## Use Smartcase Search
1903
1904- 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. \
1905 This applies to both in-file searches and project-wide searches.
1906
1907 Examples:
1908
1909 - Searching for "function" would match "function", "Function", "FUNCTION", etc.
1910 - Searching for "Function" would only match "Function", not "function" or "FUNCTION"
1911
1912- Setting: `use_smartcase_search`
1913- Default: `false`
1914
1915**Options**
1916
1917`boolean` values
1918
1919## Show Call Status Icon
1920
1921- Description: Whether or not to show the call status icon in the status bar.
1922- Setting: `show_call_status_icon`
1923- Default: `true`
1924
1925**Options**
1926
1927`boolean` values
1928
1929## Show Completions On Input
1930
1931- Description: Whether or not to show completions as you type.
1932- Setting: `show_completions_on_input`
1933- Default: `true`
1934
1935**Options**
1936
1937`boolean` values
1938
1939## Show Completion Documentation
1940
1941- Description: Whether to display inline and alongside documentation for items in the completions menu.
1942- Setting: `show_completion_documentation`
1943- Default: `true`
1944
1945**Options**
1946
1947`boolean` values
1948
1949## Show Edit Predictions
1950
1951- Description: Whether to show edit predictions as you type or manually by triggering `editor::ShowEditPrediction`.
1952- Setting: `show_edit_predictions`
1953- Default: `true`
1954
1955**Options**
1956
1957`boolean` values
1958
1959## Show Whitespaces
1960
1961- Description: Whether or not to show render whitespace characters in the editor.
1962- Setting: `show_whitespaces`
1963- Default: `selection`
1964
1965**Options**
1966
19671. `all`
19682. `selection`
19693. `none`
19704. `boundary`
1971
1972## Soft Wrap
1973
1974- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1975- Setting: `soft_wrap`
1976- Default: `none`
1977
1978**Options**
1979
19801. `none` to avoid wrapping generally, unless the line is too long
19812. `prefer_line` (deprecated, same as `none`)
19823. `editor_width` to wrap lines that overflow the editor width
19834. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
19845. `bounded` to wrap lines at the minimum of `editor_width` and `preferred_line_length`
1985
1986## Wrap Guides (Vertical Rulers)
1987
1988- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1989- Setting: `wrap_guides`
1990- Default: []
1991
1992**Options**
1993
1994List of `integer` column numbers
1995
1996## Tab Size
1997
1998- Description: The number of spaces to use for each tab character.
1999- Setting: `tab_size`
2000- Default: `4`
2001
2002**Options**
2003
2004`integer` values
2005
2006## Telemetry
2007
2008- Description: Control what info is collected by Zed.
2009- Setting: `telemetry`
2010- Default:
2011
2012```json
2013"telemetry": {
2014 "diagnostics": true,
2015 "metrics": true
2016},
2017```
2018
2019**Options**
2020
2021### Diagnostics
2022
2023- Description: Setting for sending debug-related data, such as crash reports.
2024- Setting: `diagnostics`
2025- Default: `true`
2026
2027**Options**
2028
2029`boolean` values
2030
2031### Metrics
2032
2033- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
2034- Setting: `metrics`
2035- Default: `true`
2036
2037**Options**
2038
2039`boolean` values
2040
2041## Terminal
2042
2043- Description: Configuration for the terminal.
2044- Setting: `terminal`
2045- Default:
2046
2047```json
2048{
2049 "terminal": {
2050 "alternate_scroll": "off",
2051 "blinking": "terminal_controlled",
2052 "copy_on_select": false,
2053 "dock": "bottom",
2054 "detect_venv": {
2055 "on": {
2056 "directories": [".env", "env", ".venv", "venv"],
2057 "activate_script": "default"
2058 }
2059 },
2060 "env": {},
2061 "font_family": null,
2062 "font_features": null,
2063 "font_size": null,
2064 "line_height": "comfortable",
2065 "option_as_meta": false,
2066 "button": false,
2067 "shell": {},
2068 "toolbar": {
2069 "breadcrumbs": true
2070 },
2071 "working_directory": "current_project_directory",
2072 "scrollbar": {
2073 "show": null
2074 }
2075 }
2076}
2077```
2078
2079### Terminal: Dock
2080
2081- Description: Control the position of the dock
2082- Setting: `dock`
2083- Default: `bottom`
2084
2085**Options**
2086
2087`"bottom"`, `"left"` or `"right"`
2088
2089### Terminal: Alternate Scroll
2090
2091- 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.
2092- Setting: `alternate_scroll`
2093- Default: `off`
2094
2095**Options**
2096
20971. Default alternate scroll mode to on
2098
2099```json
2100{
2101 "terminal": {
2102 "alternate_scroll": "on"
2103 }
2104}
2105```
2106
21072. Default alternate scroll mode to off
2108
2109```json
2110{
2111 "terminal": {
2112 "alternate_scroll": "off"
2113 }
2114}
2115```
2116
2117### Terminal: Blinking
2118
2119- Description: Set the cursor blinking behavior in the terminal
2120- Setting: `blinking`
2121- Default: `terminal_controlled`
2122
2123**Options**
2124
21251. Never blink the cursor, ignore the terminal mode
2126
2127```json
2128{
2129 "terminal": {
2130 "blinking": "off"
2131 }
2132}
2133```
2134
21352. Default the cursor blink to off, but allow the terminal to turn blinking on
2136
2137```json
2138{
2139 "terminal": {
2140 "blinking": "terminal_controlled"
2141 }
2142}
2143```
2144
21453. Always blink the cursor, ignore the terminal mode
2146
2147```json
2148{
2149 "terminal": {
2150 "blinking": "on"
2151 }
2152}
2153```
2154
2155### Terminal: Copy On Select
2156
2157- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
2158- Setting: `copy_on_select`
2159- Default: `false`
2160
2161**Options**
2162
2163`boolean` values
2164
2165**Example**
2166
2167```json
2168{
2169 "terminal": {
2170 "copy_on_select": true
2171 }
2172}
2173```
2174
2175### Terminal: Env
2176
2177- 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
2178- Setting: `env`
2179- Default: `{}`
2180
2181**Example**
2182
2183```json
2184{
2185 "terminal": {
2186 "env": {
2187 "ZED": "1",
2188 "KEY": "value1:value2"
2189 }
2190 }
2191}
2192```
2193
2194### Terminal: Font Size
2195
2196- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
2197- Setting: `font_size`
2198- Default: `null`
2199
2200**Options**
2201
2202`integer` values
2203
2204```json
2205{
2206 "terminal": {
2207 "font_size": 15
2208 }
2209}
2210```
2211
2212### Terminal: Font Family
2213
2214- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
2215- Setting: `font_family`
2216- Default: `null`
2217
2218**Options**
2219
2220The name of any font family installed on the user's system
2221
2222```json
2223{
2224 "terminal": {
2225 "font_family": "Berkeley Mono"
2226 }
2227}
2228```
2229
2230### Terminal: Font Features
2231
2232- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
2233- Setting: `font_features`
2234- Default: `null`
2235- Platform: macOS and Windows.
2236
2237**Options**
2238
2239See Buffer Font Features
2240
2241```json
2242{
2243 "terminal": {
2244 "font_features": {
2245 "calt": false
2246 // See Buffer Font Features for more features
2247 }
2248 }
2249}
2250```
2251
2252### Terminal: Line Height
2253
2254- Description: Set the terminal's line height.
2255- Setting: `line_height`
2256- Default: `comfortable`
2257
2258**Options**
2259
22601. Use a line height that's `comfortable` for reading, 1.618. (default)
2261
2262```json
2263{
2264 "terminal": {
2265 "line_height": "comfortable"
2266 }
2267}
2268```
2269
22702. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
2271
2272```json
2273{
2274 "terminal": {
2275 "line_height": "standard"
2276 }
2277}
2278```
2279
22803. Use a custom line height.
2281
2282```json
2283{
2284 "terminal": {
2285 "line_height": {
2286 "custom": 2
2287 }
2288 }
2289}
2290```
2291
2292### Terminal: Option As Meta
2293
2294- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
2295- Setting: `option_as_meta`
2296- Default: `false`
2297
2298**Options**
2299
2300`boolean` values
2301
2302```json
2303{
2304 "terminal": {
2305 "option_as_meta": true
2306 }
2307}
2308```
2309
2310### Terminal: Shell
2311
2312- Description: What shell to use when launching the terminal.
2313- Setting: `shell`
2314- Default: `system`
2315
2316**Options**
2317
23181. Use the system's default terminal configuration (usually the `/etc/passwd` file).
2319
2320```json
2321{
2322 "terminal": {
2323 "shell": "system"
2324 }
2325}
2326```
2327
23282. A program to launch:
2329
2330```json
2331{
2332 "terminal": {
2333 "shell": {
2334 "program": "sh"
2335 }
2336 }
2337}
2338```
2339
23403. A program with arguments:
2341
2342```json
2343{
2344 "terminal": {
2345 "shell": {
2346 "with_arguments": {
2347 "program": "/bin/bash",
2348 "args": ["--login"]
2349 }
2350 }
2351 }
2352}
2353```
2354
2355## Terminal: Detect Virtual Environments {#terminal-detect_venv}
2356
2357- 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.
2358- Setting: `detect_venv`
2359- Default:
2360
2361```json
2362{
2363 "terminal": {
2364 "detect_venv": {
2365 "on": {
2366 // Default directories to search for virtual environments, relative
2367 // to the current working directory. We recommend overriding this
2368 // in your project's settings, rather than globally.
2369 "directories": [".venv", "venv"],
2370 // Can also be `csh`, `fish`, and `nushell`
2371 "activate_script": "default"
2372 }
2373 }
2374 }
2375}
2376```
2377
2378Disable with:
2379
2380```json
2381{
2382 "terminal": {
2383 "detect_venv": "off"
2384 }
2385}
2386```
2387
2388## Terminal: Toolbar
2389
2390- Description: Whether or not to show various elements in the terminal toolbar.
2391- Setting: `toolbar`
2392- Default:
2393
2394```json
2395{
2396 "terminal": {
2397 "toolbar": {
2398 "breadcrumbs": true
2399 }
2400 }
2401}
2402```
2403
2404**Options**
2405
2406At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
2407
2408If the terminal title is empty, the breadcrumbs won't be shown.
2409
2410The shell running in the terminal needs to be configured to emit the title.
2411
2412Example command to set the title: `echo -e "\e]2;New Title\007";`
2413
2414### Terminal: Button
2415
2416- Description: Control to show or hide the terminal button in the status bar
2417- Setting: `button`
2418- Default: `true`
2419
2420**Options**
2421
2422`boolean` values
2423
2424```json
2425{
2426 "terminal": {
2427 "button": false
2428 }
2429}
2430```
2431
2432### Terminal: Working Directory
2433
2434- Description: What working directory to use when launching the terminal.
2435- Setting: `working_directory`
2436- Default: `"current_project_directory"`
2437
2438**Options**
2439
24401. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2441
2442```json
2443{
2444 "terminal": {
2445 "working_directory": "current_project_directory"
2446 }
2447}
2448```
2449
24502. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2451
2452```json
2453{
2454 "terminal": {
2455 "working_directory": "first_project_directory"
2456 }
2457}
2458```
2459
24603. Always use this platform's home directory (if we can find it)
2461
2462```json
2463{
2464 "terminal": {
2465 "working_directory": "always_home"
2466 }
2467}
2468```
2469
24704. 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.
2471
2472```json
2473{
2474 "terminal": {
2475 "working_directory": {
2476 "always": {
2477 "directory": "~/zed/projects/"
2478 }
2479 }
2480 }
2481}
2482```
2483
2484## Theme
2485
2486- 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.
2487- Setting: `theme`
2488- Default: `One Dark`
2489
2490### Theme Object
2491
2492- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
2493- Setting: `theme`
2494- Default:
2495
2496```json
2497"theme": {
2498 "mode": "system",
2499 "dark": "One Dark",
2500 "light": "One Light"
2501},
2502```
2503
2504### Mode
2505
2506- Description: Specify theme mode.
2507- Setting: `mode`
2508- Default: `system`
2509
2510**Options**
2511
25121. Set the theme to dark mode
2513
2514```json
2515{
2516 "mode": "dark"
2517}
2518```
2519
25202. Set the theme to light mode
2521
2522```json
2523{
2524 "mode": "light"
2525}
2526```
2527
25283. Set the theme to system mode
2529
2530```json
2531{
2532 "mode": "system"
2533}
2534```
2535
2536### Dark
2537
2538- Description: The name of the dark Zed theme to use for the UI.
2539- Setting: `dark`
2540- Default: `One Dark`
2541
2542**Options**
2543
2544Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2545
2546### Light
2547
2548- Description: The name of the light Zed theme to use for the UI.
2549- Setting: `light`
2550- Default: `One Light`
2551
2552**Options**
2553
2554Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2555
2556## Vim
2557
2558- Description: Whether or not to enable vim mode (work in progress).
2559- Setting: `vim_mode`
2560- Default: `false`
2561
2562## Project Panel
2563
2564- Description: Customize project panel
2565- Setting: `project_panel`
2566- Default:
2567
2568```json
2569{
2570 "project_panel": {
2571 "button": true,
2572 "default_width": 240,
2573 "dock": "left",
2574 "entry_spacing": "comfortable",
2575 "file_icons": true,
2576 "folder_icons": true,
2577 "git_status": true,
2578 "indent_size": 20,
2579 "indent_guides": true,
2580 "auto_reveal_entries": true,
2581 "auto_fold_dirs": true,
2582 "scrollbar": {
2583 "show": null
2584 },
2585 "indent_guides": {
2586 "show": "always"
2587 }
2588 }
2589}
2590```
2591
2592### Dock
2593
2594- Description: Control the position of the dock
2595- Setting: `dock`
2596- Default: `left`
2597
2598**Options**
2599
26001. Default dock position to left
2601
2602```json
2603{
2604 "dock": "left"
2605}
2606```
2607
26082. Default dock position to right
2609
2610```json
2611{
2612 "dock": "right"
2613}
2614```
2615
2616### Entry Spacing
2617
2618- Description: Spacing between worktree entries
2619- Setting: `entry_spacing`
2620- Default: `comfortable`
2621
2622**Options**
2623
26241. Comfortable entry spacing
2625
2626```json
2627{
2628 "entry_spacing": "comfortable"
2629}
2630```
2631
26322. Standard entry spacing
2633
2634```json
2635{
2636 "entry_spacing": "standard"
2637}
2638```
2639
2640### Git Status
2641
2642- Description: Indicates newly created and updated files
2643- Setting: `git_status`
2644- Default: `true`
2645
2646**Options**
2647
26481. Default enable git status
2649
2650```json
2651{
2652 "git_status": true
2653}
2654```
2655
26562. Default disable git status
2657
2658```json
2659{
2660 "git_status": false
2661}
2662```
2663
2664### Default Width
2665
2666- Description: Customize default width taken by project panel
2667- Setting: `default_width`
2668- Default: N/A width in pixels (eg: 420)
2669
2670**Options**
2671
2672`boolean` values
2673
2674### Auto Reveal Entries
2675
2676- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
2677- Setting: `auto_reveal_entries`
2678- Default: `true`
2679
2680**Options**
2681
26821. Enable auto reveal entries
2683
2684```json
2685{
2686 "auto_reveal_entries": true
2687}
2688```
2689
26902. Disable auto reveal entries
2691
2692```json
2693{
2694 "auto_reveal_entries": false
2695}
2696```
2697
2698### Auto Fold Dirs
2699
2700- Description: Whether to fold directories automatically when directory has only one directory inside.
2701- Setting: `auto_fold_dirs`
2702- Default: `true`
2703
2704**Options**
2705
27061. Enable auto fold dirs
2707
2708```json
2709{
2710 "auto_fold_dirs": true
2711}
2712```
2713
27142. Disable auto fold dirs
2715
2716```json
2717{
2718 "auto_fold_dirs": false
2719}
2720```
2721
2722### Indent Size
2723
2724- Description: Amount of indentation (in pixels) for nested items.
2725- Setting: `indent_size`
2726- Default: `20`
2727
2728### Indent Guides: Show
2729
2730- Description: Whether to show indent guides in the project panel. Possible values: "always", "never".
2731- Setting: `indent_guides`
2732
2733```json
2734"indent_guides": {
2735 "show": "always"
2736}
2737```
2738
2739**Options**
2740
27411. Show indent guides in the project panel
2742
2743```json
2744{
2745 "indent_guides": {
2746 "show": "always"
2747 }
2748}
2749```
2750
27512. Hide indent guides in the project panel
2752
2753```json
2754{
2755 "indent_guides": {
2756 "show": "never"
2757 }
2758}
2759```
2760
2761### Scrollbar: Show
2762
2763- 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.
2764- Setting: `scrollbar`
2765- Default:
2766
2767```json
2768"scrollbar": {
2769 "show": null
2770}
2771```
2772
2773**Options**
2774
27751. Show scrollbar in the project panel
2776
2777```json
2778{
2779 "scrollbar": {
2780 "show": "always"
2781 }
2782}
2783```
2784
27852. Hide scrollbar in the project panel
2786
2787```json
2788{
2789 "scrollbar": {
2790 "show": "never"
2791 }
2792}
2793```
2794
2795## Assistant Panel
2796
2797- Description: Customize assistant panel
2798- Setting: `assistant`
2799- Default:
2800
2801```json
2802"assistant": {
2803 "enabled": true,
2804 "button": true,
2805 "dock": "right",
2806 "default_width": 640,
2807 "default_height": 320,
2808 "provider": "openai",
2809 "version": "1",
2810},
2811```
2812
2813## Outline Panel
2814
2815- Description: Customize outline Panel
2816- Setting: `outline_panel`
2817- Default:
2818
2819```json
2820"outline_panel": {
2821 "button": true,
2822 "default_width": 240,
2823 "dock": "left",
2824 "file_icons": true,
2825 "folder_icons": true,
2826 "git_status": true,
2827 "indent_size": 20,
2828 "auto_reveal_entries": true,
2829 "auto_fold_dirs": true,
2830 "indent_guides": {
2831 "show": "always"
2832 },
2833 "scrollbar": {
2834 "show": null
2835 }
2836}
2837```
2838
2839## Calls
2840
2841- Description: Customize behavior when participating in a call
2842- Setting: `calls`
2843- Default:
2844
2845```json
2846"calls": {
2847 // Join calls with the microphone live by default
2848 "mute_on_join": false,
2849 // Share your project when you are the first to join a channel
2850 "share_on_join": false
2851},
2852```
2853
2854## Unnecessary Code Fade
2855
2856- Description: How much to fade out unused code.
2857- Setting: `unnecessary_code_fade`
2858- Default: `0.3`
2859
2860**Options**
2861
2862Float values between `0.0` and `0.9`, where:
2863
2864- `0.0` means no fading (unused code looks the same as used code)
2865- `0.9` means maximum fading (unused code is very faint but still visible)
2866
2867**Example**
2868
2869```json
2870{
2871 "unnecessary_code_fade": 0.5
2872}
2873```
2874
2875## UI Font Family
2876
2877- Description: The name of the font to use for text in the UI.
2878- Setting: `ui_font_family`
2879- Default: `Zed Plex Sans`
2880
2881**Options**
2882
2883The name of any font family installed on the system.
2884
2885## UI Font Features
2886
2887- Description: The OpenType features to enable for text in the UI.
2888- Setting: `ui_font_features`
2889- Default: `null`
2890- Platform: macOS and Windows.
2891
2892**Options**
2893
2894Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
2895
2896For example, to disable font ligatures, add the following to your settings:
2897
2898```json
2899{
2900 "ui_font_features": {
2901 "calt": false
2902 }
2903}
2904```
2905
2906You can also set other OpenType features, like setting `cv01` to `7`:
2907
2908```json
2909{
2910 "ui_font_features": {
2911 "cv01": 7
2912 }
2913}
2914```
2915
2916## UI Font Fallbacks
2917
2918- Description: The font fallbacks to use for text in the UI.
2919- Setting: `ui_font_fallbacks`
2920- Default: `null`
2921- Platform: macOS and Windows.
2922
2923**Options**
2924
2925For example, to use `Nerd Font` as a fallback, add the following to your settings:
2926
2927```json
2928{
2929 "ui_font_fallbacks": ["Nerd Font"]
2930}
2931```
2932
2933## UI Font Size
2934
2935- Description: The default font size for text in the UI.
2936- Setting: `ui_font_size`
2937- Default: `16`
2938
2939**Options**
2940
2941`integer` values from `6` to `100` pixels (inclusive)
2942
2943## UI Font Weight
2944
2945- Description: The default font weight for text in the UI.
2946- Setting: `ui_font_weight`
2947- Default: `400`
2948
2949**Options**
2950
2951`integer` values between `100` and `900`
2952
2953## An example configuration:
2954
2955```json
2956// ~/.config/zed/settings.json
2957{
2958 "theme": "cave-light",
2959 "tab_size": 2,
2960 "preferred_line_length": 80,
2961 "soft_wrap": "none",
2962
2963 "buffer_font_size": 18,
2964 "buffer_font_family": "Zed Plex Mono",
2965
2966 "autosave": "on_focus_change",
2967 "format_on_save": "off",
2968 "vim_mode": false,
2969 "projects_online_by_default": true,
2970 "terminal": {
2971 "font_family": "FiraCode Nerd Font Mono",
2972 "blinking": "off"
2973 },
2974 "languages": {
2975 "C": {
2976 "format_on_save": "language_server",
2977 "preferred_line_length": 64,
2978 "soft_wrap": "preferred_line_length"
2979 }
2980 }
2981}
2982```