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