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## LSP Highlight Debounce
476
477- Description: The debounce delay before querying highlights from the language server based on the current cursor location.
478- Setting: `lsp_highlight_debounce`
479- Default: `75`
480
481## Cursor Blink
482
483- Description: Whether or not the cursor blinks.
484- Setting: `cursor_blink`
485- Default: `true`
486
487**Options**
488
489`boolean` values
490
491## Cursor Shape
492
493- Description: Cursor shape for the default editor.
494- Setting: `cursor_shape`
495- Default: `bar`
496
497**Options**
498
4991. A vertical bar:
500
501```json
502"cursor_shape": "bar"
503```
504
5052. A block that surrounds the following character:
506
507```json
508"cursor_shape": "block"
509```
510
5113. An underline / underscore that runs along the following character:
512
513```json
514"cursor_shape": "underline"
515```
516
5174. An box drawn around the following character:
518
519```json
520"cursor_shape": "hollow"
521```
522
523## Editor Scrollbar
524
525- Description: Whether or not to show the editor scrollbar and various elements in it.
526- Setting: `scrollbar`
527- Default:
528
529```json
530"scrollbar": {
531 "show": "auto",
532 "cursors": true,
533 "git_diff": true,
534 "search_results": true,
535 "selected_symbol": true,
536 "diagnostics": "all",
537 "axes": {
538 "horizontal": true,
539 "vertical": true,
540 },
541},
542```
543
544### Show Mode
545
546- Description: When to show the editor scrollbar.
547- Setting: `show`
548- Default: `auto`
549
550**Options**
551
5521. Show the scrollbar if there's important information or follow the system's configured behavior:
553
554```json
555"scrollbar": {
556 "show": "auto"
557}
558```
559
5602. Match the system's configured behavior:
561
562```json
563"scrollbar": {
564 "show": "system"
565}
566```
567
5683. Always show the scrollbar:
569
570```json
571"scrollbar": {
572 "show": "always"
573}
574```
575
5764. Never show the scrollbar:
577
578```json
579"scrollbar": {
580 "show": "never"
581}
582```
583
584### Cursor Indicators
585
586- Description: Whether to show cursor positions in the scrollbar.
587- Setting: `cursors`
588- Default: `true`
589
590**Options**
591
592`boolean` values
593
594### Git Diff Indicators
595
596- Description: Whether to show git diff indicators in the scrollbar.
597- Setting: `git_diff`
598- Default: `true`
599
600**Options**
601
602`boolean` values
603
604### Search Results Indicators
605
606- Description: Whether to show buffer search results in the scrollbar.
607- Setting: `search_results`
608- Default: `true`
609
610**Options**
611
612`boolean` values
613
614### Selected Symbols Indicators
615
616- Description: Whether to show selected symbol occurrences in the scrollbar.
617- Setting: `selected_symbol`
618- Default: `true`
619
620**Options**
621
622`boolean` values
623
624### Diagnostics
625
626- Description: Which diagnostic indicators to show in the scrollbar.
627- Setting: `diagnostics`
628- Default: `all`
629
630**Options**
631
6321. Show all diagnostics:
633
634```json
635{
636 "diagnostics": "all"
637}
638```
639
6402. Do not show any diagnostics:
641
642```json
643{
644 "diagnostics": "none"
645}
646```
647
6483. Show only errors:
649
650```json
651{
652 "diagnostics": "error"
653}
654```
655
6564. Show only errors and warnings:
657
658```json
659{
660 "diagnostics": "warning"
661}
662```
663
6645. Show only errors, warnings, and information:
665
666```json
667{
668 "diagnostics": "information"
669}
670```
671
672### Axes
673
674- Description: Forcefully enable or disable the scrollbar for each axis
675- Setting: `axes`
676- Default:
677
678```json
679"scrollbar": {
680 "axes": {
681 "horizontal": true,
682 "vertical": true,
683 },
684}
685```
686
687#### Horizontal
688
689- Description: When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
690- Setting: `horizontal`
691- Default: `true`
692
693**Options**
694
695`boolean` values
696
697#### Vertical
698
699- Description: When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
700- Setting: `vertical`
701- Default: `true`
702
703**Options**
704
705`boolean` values
706
707## Editor Tab Bar
708
709- Description: Settings related to the editor's tab bar.
710- Settings: `tab_bar`
711- Default:
712
713```json
714"tab_bar": {
715 "show": true,
716 "show_nav_history_buttons": true,
717 "show_tab_bar_buttons": true
718}
719```
720
721### Show
722
723- Description: Whether or not to show the tab bar in the editor.
724- Setting: `show`
725- Default: `true`
726
727**Options**
728
729`boolean` values
730
731### Navigation History Buttons
732
733- Description: Whether or not to show the navigation history buttons.
734- Setting: `show_nav_history_buttons`
735- Default: `true`
736
737**Options**
738
739`boolean` values
740
741### Tab Bar Buttons
742
743- Description: Whether or not to show the tab bar buttons.
744- Setting: `show_tab_bar_buttons`
745- Default: `true`
746
747**Options**
748
749`boolean` values
750
751## Editor Tabs
752
753- Description: Configuration for the editor tabs.
754- Setting: `tabs`
755- Default:
756
757```json
758"tabs": {
759 "close_position": "right",
760 "file_icons": false,
761 "git_status": false,
762 "activate_on_close": "history",
763 "always_show_close_button": false
764},
765```
766
767### Close Position
768
769- Description: Where to display close button within a tab.
770- Setting: `close_position`
771- Default: `right`
772
773**Options**
774
7751. Display the close button on the right:
776
777```json
778{
779 "close_position": "right"
780}
781```
782
7832. Display the close button on the left:
784
785```json
786{
787 "close_position": "left"
788}
789```
790
791### File Icons
792
793- Description: Whether to show the file icon for a tab.
794- Setting: `file_icons`
795- Default: `false`
796
797### Git Status
798
799- Description: Whether or not to show Git file status in tab.
800- Setting: `git_status`
801- Default: `false`
802
803### Activate on close
804
805- Description: What to do after closing the current tab.
806- Setting: `activate_on_close`
807- Default: `history`
808
809**Options**
810
8111. Activate the tab that was open previously:
812
813```json
814{
815 "activate_on_close": "history"
816}
817```
818
8192. Activate the right neighbour tab if present:
820
821```json
822{
823 "activate_on_close": "neighbour"
824}
825```
826
8273. Activate the left neighbour tab if present:
828
829```json
830{
831 "activate_on_close": "left_neighbour"
832}
833```
834
835### Always show the close button
836
837- Description: Whether to always show the close button on tabs.
838- Setting: `always_show_close_button`
839- Default: `false`
840
841## Editor Toolbar
842
843- Description: Whether or not to show various elements in the editor toolbar.
844- Setting: `toolbar`
845- Default:
846
847```json
848"toolbar": {
849 "breadcrumbs": true,
850 "quick_actions": true
851},
852```
853
854**Options**
855
856Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
857
858## Enable Language Server
859
860- Description: Whether or not to use language servers to provide code intelligence.
861- Setting: `enable_language_server`
862- Default: `true`
863
864**Options**
865
866`boolean` values
867
868## Ensure Final Newline On Save
869
870- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
871- Setting: `ensure_final_newline_on_save`
872- Default: `true`
873
874**Options**
875
876`boolean` values
877
878## LSP
879
880- Description: Configuration for language servers.
881- Setting: `lsp`
882- Default: `null`
883
884**Options**
885
886The following settings can be overridden for specific language servers:
887
888- `initialization_options`
889- `settings`
890
891To override configuration for a language server, add an entry for that language server's name to the `lsp` value.
892
893Some 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.
894
895For example to pass the `check` option to `rust-analyzer`, use the following configuration:
896
897```json
898"lsp": {
899 "rust-analyzer": {
900 "initialization_options": {
901 "check": {
902 "command": "clippy" // rust-analyzer.check.command (default: "check")
903 }
904 }
905 }
906}
907```
908
909While other options may be changed at a runtime and should be placed under `settings`:
910
911```json
912"lsp": {
913 "yaml-language-server": {
914 "settings": {
915 "yaml": {
916 "keyOrdering": true // Enforces alphabetical ordering of keys in maps
917 }
918 }
919 }
920}
921```
922
923## Format On Save
924
925- Description: Whether or not to perform a buffer format before saving.
926- Setting: `format_on_save`
927- Default: `on`
928
929**Options**
930
9311. `on`, enables format on save obeying `formatter` setting:
932
933```json
934{
935 "format_on_save": "on"
936}
937```
938
9392. `off`, disables format on save:
940
941```json
942{
943 "format_on_save": "off"
944}
945```
946
947## Formatter
948
949- Description: How to perform a buffer format.
950- Setting: `formatter`
951- Default: `auto`
952
953**Options**
954
9551. To use the current language server, use `"language_server"`:
956
957```json
958{
959 "formatter": "language_server"
960}
961```
962
9632. 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):
964
965```json
966{
967 "formatter": {
968 "external": {
969 "command": "sed",
970 "arguments": ["-e", "s/ *$//"]
971 }
972 }
973}
974```
975
9763. 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.
977
978WARNING: `{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.
979
980```json
981 "formatter": {
982 "external": {
983 "command": "prettier",
984 "arguments": ["--stdin-filepath", "{buffer_path}"]
985 }
986 }
987```
988
9894. Or to use code actions provided by the connected language servers, use `"code_actions"`:
990
991```json
992{
993 "formatter": {
994 "code_actions": {
995 // Use ESLint's --fix:
996 "source.fixAll.eslint": true,
997 // Organize imports on save:
998 "source.organizeImports": true
999 }
1000 }
1001}
1002```
1003
10045. Or to use multiple formatters consecutively, use an array of formatters:
1005
1006```json
1007{
1008 "formatter": [
1009 { "language_server": { "name": "rust-analyzer" } },
1010 {
1011 "external": {
1012 "command": "sed",
1013 "arguments": ["-e", "s/ *$//"]
1014 }
1015 }
1016 ]
1017}
1018```
1019
1020Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
1021If any of the formatters fails, the subsequent ones will still be executed.
1022
1023## Code Actions On Format
1024
1025- Description: The code actions to perform with the primary language server when formatting the buffer.
1026- Setting: `code_actions_on_format`
1027- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
1028
1029**Examples**
1030
1031<!--
1032TBD: Add Python Ruff source.organizeImports example
1033-->
1034
10351. Organize imports on format in TypeScript and TSX buffers:
1036
1037```json
1038{
1039 "languages": {
1040 "TypeScript": {
1041 "code_actions_on_format": {
1042 "source.organizeImports": true
1043 }
1044 },
1045 "TSX": {
1046 "code_actions_on_format": {
1047 "source.organizeImports": true
1048 }
1049 }
1050 }
1051}
1052```
1053
10542. Run ESLint `fixAll` code action when formatting:
1055
1056```json
1057{
1058 "languages": {
1059 "JavaScript": {
1060 "code_actions_on_format": {
1061 "source.fixAll.eslint": true
1062 }
1063 }
1064 }
1065}
1066```
1067
10683. Run only a single ESLint rule when using `fixAll`:
1069
1070```json
1071{
1072 "languages": {
1073 "JavaScript": {
1074 "code_actions_on_format": {
1075 "source.fixAll.eslint": true
1076 }
1077 }
1078 },
1079 "lsp": {
1080 "eslint": {
1081 "settings": {
1082 "codeActionOnSave": {
1083 "rules": ["import/order"]
1084 }
1085 }
1086 }
1087 }
1088}
1089```
1090
1091## Auto close
1092
1093- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
1094- Setting: `use_autoclose`
1095- Default: `true`
1096
1097**Options**
1098
1099`boolean` values
1100
1101## Always Treat Brackets As Autoclosed
1102
1103- Description: Controls how the editor handles the autoclosed characters.
1104- Setting: `always_treat_brackets_as_autoclosed`
1105- Default: `false`
1106
1107**Options**
1108
1109`boolean` values
1110
1111**Example**
1112
1113If the setting is set to `true`:
1114
11151. Enter in the editor: `)))`
11162. Move the cursor to the start: `^)))`
11173. Enter again: `)))`
1118
1119The result is still `)))` and not `))))))`, which is what it would be by default.
1120
1121## File Scan Exclusions
1122
1123- Setting: `file_scan_exclusions`
1124- Description: Configure how Add filename or directory globs that will be excluded by Zed entirely. They will be skipped during file scans, file searches and hidden from project file tree.
1125- Default:
1126
1127```json
1128"file_scan_exclusions": [
1129 "**/.git",
1130 "**/.svn",
1131 "**/.hg",
1132 "**/.jj",
1133 "**/CVS",
1134 "**/.DS_Store",
1135 "**/Thumbs.db",
1136 "**/.classpath",
1137 "**/.settings"
1138],
1139```
1140
1141Note, 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.
1142
1143## File Types
1144
1145- Setting: `file_types`
1146- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
1147- Default: `{}`
1148
1149**Examples**
1150
1151To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
1152
1153```json
1154{
1155 "file_types": {
1156 "C++": ["c"],
1157 "TOML": ["MyLockFile"],
1158 "Dockerfile": ["Dockerfile*"]
1159 }
1160}
1161```
1162
1163## Git
1164
1165- Description: Configuration for git-related features.
1166- Setting: `git`
1167- Default:
1168
1169```json
1170{
1171 "git": {
1172 "git_gutter": "tracked_files",
1173 "inline_blame": {
1174 "enabled": true
1175 }
1176 }
1177}
1178```
1179
1180### Git Gutter
1181
1182- Description: Whether or not to show the git gutter.
1183- Setting: `git_gutter`
1184- Default: `tracked_files`
1185
1186**Options**
1187
11881. Show git gutter in tracked files
1189
1190```json
1191{
1192 "git": {
1193 "git_gutter": "tracked_files"
1194 }
1195}
1196```
1197
11982. Hide git gutter
1199
1200```json
1201{
1202 "git": {
1203 "git_gutter": "hide"
1204 }
1205}
1206```
1207
1208### Inline Git Blame
1209
1210- Description: Whether or not to show git blame information inline, on the currently focused line.
1211- Setting: `inline_blame`
1212- Default:
1213
1214```json
1215{
1216 "git": {
1217 "inline_blame": {
1218 "enabled": true
1219 }
1220 }
1221}
1222```
1223
1224**Options**
1225
12261. Disable inline git blame:
1227
1228```json
1229{
1230 "git": {
1231 "inline_blame": {
1232 "enabled": false
1233 }
1234 }
1235}
1236```
1237
12382. Only show inline git blame after a delay (that starts after cursor stops moving):
1239
1240```json
1241{
1242 "git": {
1243 "inline_blame": {
1244 "enabled": true,
1245 "delay_ms": 500
1246 }
1247 }
1248}
1249```
1250
12513. Show a commit summary next to the commit date and author:
1252
1253```json
1254{
1255 "git": {
1256 "inline_blame": {
1257 "enabled": true,
1258 "show_commit_summary": true
1259 }
1260 }
1261}
1262```
1263
12644. Use this as the minimum column at which to display inline blame information:
1265
1266```json
1267{
1268 "git": {
1269 "inline_blame": {
1270 "enabled": true,
1271 "min_column": 80
1272 }
1273 }
1274}
1275```
1276
1277## Indent Guides
1278
1279- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1280- Setting: `indent_guides`
1281- Default:
1282
1283```json
1284{
1285 "indent_guides": {
1286 "enabled": true,
1287 "line_width": 1,
1288 "active_line_width": 1,
1289 "coloring": "fixed",
1290 "background_coloring": "disabled"
1291 }
1292}
1293```
1294
1295**Options**
1296
12971. Disable indent guides
1298
1299```json
1300{
1301 "indent_guides": {
1302 "enabled": false
1303 }
1304}
1305```
1306
13072. Enable indent guides for a specific language.
1308
1309```json
1310{
1311 "languages": {
1312 "Python": {
1313 "indent_guides": {
1314 "enabled": true
1315 }
1316 }
1317 }
1318}
1319```
1320
13213. Enable indent aware coloring ("rainbow indentation").
1322 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.
1323
1324```json
1325{
1326 "indent_guides": {
1327 "enabled": true,
1328 "coloring": "indent_aware"
1329 }
1330}
1331```
1332
13334. Enable indent aware background coloring ("rainbow indentation").
1334 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.
1335
1336```json
1337{
1338 "indent_guides": {
1339 "enabled": true,
1340 "coloring": "indent_aware",
1341 "background_coloring": "indent_aware"
1342 }
1343}
1344```
1345
1346## Hard Tabs
1347
1348- Description: Whether to indent lines using tab characters or multiple spaces.
1349- Setting: `hard_tabs`
1350- Default: `false`
1351
1352**Options**
1353
1354`boolean` values
1355
1356## Hover Popover Enabled
1357
1358- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1359- Setting: `hover_popover_enabled`
1360- Default: `true`
1361
1362**Options**
1363
1364`boolean` values
1365
1366## Inlay hints
1367
1368- Description: Configuration for displaying extra text with hints in the editor.
1369- Setting: `inlay_hints`
1370- Default:
1371
1372```json
1373"inlay_hints": {
1374 "enabled": false,
1375 "show_type_hints": true,
1376 "show_parameter_hints": true,
1377 "show_other_hints": true,
1378 "show_background": false,
1379 "edit_debounce_ms": 700,
1380 "scroll_debounce_ms": 50
1381}
1382```
1383
1384**Options**
1385
1386Inlay hints querying consists of two parts: editor (client) and LSP server.
1387With 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.
1388At 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.
1389
1390The following languages have inlay hints preconfigured by Zed:
1391
1392- [Go](https://docs.zed.dev/languages/go)
1393- [Rust](https://docs.zed.dev/languages/rust)
1394- [Svelte](https://docs.zed.dev/languages/svelte)
1395- [Typescript](https://docs.zed.dev/languages/typescript)
1396
1397Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
1398
1399Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
1400Settings-related hint updates are not debounced.
1401
1402## Journal
1403
1404- Description: Configuration for the journal.
1405- Setting: `journal`
1406- Default:
1407
1408```json
1409"journal": {
1410 "path": "~",
1411 "hour_format": "hour12"
1412}
1413```
1414
1415### Path
1416
1417- Description: The path of the directory where journal entries are stored.
1418- Setting: `path`
1419- Default: `~`
1420
1421**Options**
1422
1423`string` values
1424
1425### Hour Format
1426
1427- Description: The format to use for displaying hours in the journal.
1428- Setting: `hour_format`
1429- Default: `hour12`
1430
1431**Options**
1432
14331. 12-hour format:
1434
1435```json
1436{
1437 "hour_format": "hour12"
1438}
1439```
1440
14412. 24-hour format:
1442
1443```json
1444{
1445 "hour_format": "hour24"
1446}
1447```
1448
1449## Languages
1450
1451- Description: Configuration for specific languages.
1452- Setting: `languages`
1453- Default: `null`
1454
1455**Options**
1456
1457To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1458
1459```json
1460"languages": {
1461 "C": {
1462 "format_on_save": "off",
1463 "preferred_line_length": 64,
1464 "soft_wrap": "preferred_line_length"
1465 },
1466 "JSON": {
1467 "tab_size": 4
1468 }
1469}
1470```
1471
1472The following settings can be overridden for each specific language:
1473
1474- [`enable_language_server`](#enable-language-server)
1475- [`ensure_final_newline_on_save`](#ensure-final-newline-on-save)
1476- [`format_on_save`](#format-on-save)
1477- [`formatter`](#formatter)
1478- [`hard_tabs`](#hard-tabs)
1479- [`preferred_line_length`](#preferred-line-length)
1480- [`remove_trailing_whitespace_on_save`](#remove-trailing-whitespace-on-save)
1481- [`show_edit_predictions`](#show-edit-predictions)
1482- [`show_whitespaces`](#show-whitespaces)
1483- [`soft_wrap`](#soft-wrap)
1484- [`tab_size`](#tab-size)
1485- [`use_autoclose`](#use-autoclose)
1486- [`always_treat_brackets_as_autoclosed`](#always-treat-brackets-as-autoclosed)
1487
1488These values take in the same options as the root-level settings with the same name.
1489
1490## Network Proxy
1491
1492- Description: Configure a network proxy for Zed.
1493- Setting: `proxy`
1494- Default: `null`
1495
1496**Options**
1497
1498The proxy setting must contain a URL to the proxy.
1499
1500The following URI schemes are supported:
1501
1502- `http`
1503- `https`
1504- `socks4` - SOCKS4 proxy with local DNS
1505- `socks4a` - SOCKS4 proxy with remote DNS
1506- `socks5` - SOCKS5 proxy with local DNS
1507- `socks5h` - SOCKS5 proxy with remote DNS
1508
1509`http` will be used when no scheme is specified.
1510
1511By 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`.
1512
1513For example, to set an `http` proxy, add the following to your settings:
1514
1515```json
1516{
1517 "proxy": "http://127.0.0.1:10809"
1518}
1519```
1520
1521Or to set a `socks5` proxy:
1522
1523```json
1524{
1525 "proxy": "socks5h://localhost:10808"
1526}
1527```
1528
1529## Preview tabs
1530
1531- Description:
1532 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. \
1533 There are several ways to convert a preview tab into a regular tab:
1534
1535 - Double-clicking on the file
1536 - Double-clicking on the tab header
1537 - Using the `project_panel::OpenPermanent` action
1538 - Editing the file
1539 - Dragging the file to a different pane
1540
1541- Setting: `preview_tabs`
1542- Default:
1543
1544```json
1545"preview_tabs": {
1546 "enabled": true,
1547 "enable_preview_from_file_finder": false,
1548 "enable_preview_from_code_navigation": false,
1549}
1550```
1551
1552### Enable preview from file finder
1553
1554- Description: Determines whether to open files in preview mode when selected from the file finder.
1555- Setting: `enable_preview_from_file_finder`
1556- Default: `false`
1557
1558**Options**
1559
1560`boolean` values
1561
1562### Enable preview from code navigation
1563
1564- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1565- Setting: `enable_preview_from_code_navigation`
1566- Default: `false`
1567
1568**Options**
1569
1570`boolean` values
1571
1572## File Finder
1573
1574### Modal Max Width
1575
1576- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
1577- Setting: `max_modal_width`
1578- Default: `small`
1579
1580## Preferred Line Length
1581
1582- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1583- Setting: `preferred_line_length`
1584- Default: `80`
1585
1586**Options**
1587
1588`integer` values
1589
1590## Projects Online By Default
1591
1592- Description: Whether or not to show the online projects view by default.
1593- Setting: `projects_online_by_default`
1594- Default: `true`
1595
1596**Options**
1597
1598`boolean` values
1599
1600## Remove Trailing Whitespace On Save
1601
1602- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1603- Setting: `remove_trailing_whitespace_on_save`
1604- Default: `true`
1605
1606**Options**
1607
1608`boolean` values
1609
1610## Search
1611
1612- Description: Search options to enable by default when opening new project and buffer searches.
1613- Setting: `search`
1614- Default:
1615
1616```json
1617"search": {
1618 "whole_word": false,
1619 "case_sensitive": false,
1620 "include_ignored": false,
1621 "regex": false
1622},
1623```
1624
1625## Show Call Status Icon
1626
1627- Description: Whether or not to show the call status icon in the status bar.
1628- Setting: `show_call_status_icon`
1629- Default: `true`
1630
1631**Options**
1632
1633`boolean` values
1634
1635## Show Completions On Input
1636
1637- Description: Whether or not to show completions as you type.
1638- Setting: `show_completions_on_input`
1639- Default: `true`
1640
1641**Options**
1642
1643`boolean` values
1644
1645## Show Completion Documentation
1646
1647- Description: Whether to display inline and alongside documentation for items in the completions menu.
1648- Setting: `show_completion_documentation`
1649- Default: `true`
1650
1651**Options**
1652
1653`boolean` values
1654
1655## Show Edit Predictions
1656
1657- Description: Whether to show edit predictions as you type or manually by triggering `editor::ShowEditPrediction`.
1658- Setting: `show_edit_predictions`
1659- Default: `true`
1660
1661**Options**
1662
1663`boolean` values
1664
1665## Show Whitespaces
1666
1667- Description: Whether or not to show render whitespace characters in the editor.
1668- Setting: `show_whitespaces`
1669- Default: `selection`
1670
1671**Options**
1672
16731. `all`
16742. `selection`
16753. `none`
16764. `boundary`
1677
1678## Soft Wrap
1679
1680- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1681- Setting: `soft_wrap`
1682- Default: `none`
1683
1684**Options**
1685
16861. `none` to avoid wrapping generally, unless the line is too long
16872. `prefer_line` (deprecated, same as `none`)
16883. `editor_width` to wrap lines that overflow the editor width
16894. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
16905. `bounded` to wrap lines at the minimum of `editor_width` and `preferred_line_length`
1691
1692## Wrap Guides (Vertical Rulers)
1693
1694- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1695- Setting: `wrap_guides`
1696- Default: []
1697
1698**Options**
1699
1700List of `integer` column numbers
1701
1702## Tab Size
1703
1704- Description: The number of spaces to use for each tab character.
1705- Setting: `tab_size`
1706- Default: `4`
1707
1708**Options**
1709
1710`integer` values
1711
1712## Telemetry
1713
1714- Description: Control what info is collected by Zed.
1715- Setting: `telemetry`
1716- Default:
1717
1718```json
1719"telemetry": {
1720 "diagnostics": true,
1721 "metrics": true
1722},
1723```
1724
1725**Options**
1726
1727### Diagnostics
1728
1729- Description: Setting for sending debug-related data, such as crash reports.
1730- Setting: `diagnostics`
1731- Default: `true`
1732
1733**Options**
1734
1735`boolean` values
1736
1737### Metrics
1738
1739- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1740- Setting: `metrics`
1741- Default: `true`
1742
1743**Options**
1744
1745`boolean` values
1746
1747## Terminal
1748
1749- Description: Configuration for the terminal.
1750- Setting: `terminal`
1751- Default:
1752
1753```json
1754{
1755 "terminal": {
1756 "alternate_scroll": "off",
1757 "blinking": "terminal_controlled",
1758 "copy_on_select": false,
1759 "dock": "bottom",
1760 "detect_venv": {
1761 "on": {
1762 "directories": [".env", "env", ".venv", "venv"],
1763 "activate_script": "default"
1764 }
1765 },
1766 "env": {},
1767 "font_family": null,
1768 "font_features": null,
1769 "font_size": null,
1770 "line_height": "comfortable",
1771 "option_as_meta": false,
1772 "button": false,
1773 "shell": {},
1774 "toolbar": {
1775 "breadcrumbs": true
1776 },
1777 "working_directory": "current_project_directory",
1778 "scrollbar": {
1779 "show": null
1780 }
1781 }
1782}
1783```
1784
1785### Terminal: Dock
1786
1787- Description: Control the position of the dock
1788- Setting: `dock`
1789- Default: `bottom`
1790
1791**Options**
1792
1793`"bottom"`, `"left"` or `"right"`
1794
1795### Terminal: Alternate Scroll
1796
1797- 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.
1798- Setting: `alternate_scroll`
1799- Default: `off`
1800
1801**Options**
1802
18031. Default alternate scroll mode to on
1804
1805```json
1806{
1807 "terminal": {
1808 "alternate_scroll": "on"
1809 }
1810}
1811```
1812
18132. Default alternate scroll mode to off
1814
1815```json
1816{
1817 "terminal": {
1818 "alternate_scroll": "off"
1819 }
1820}
1821```
1822
1823### Terminal: Blinking
1824
1825- Description: Set the cursor blinking behavior in the terminal
1826- Setting: `blinking`
1827- Default: `terminal_controlled`
1828
1829**Options**
1830
18311. Never blink the cursor, ignore the terminal mode
1832
1833```json
1834{
1835 "terminal": {
1836 "blinking": "off"
1837 }
1838}
1839```
1840
18412. Default the cursor blink to off, but allow the terminal to turn blinking on
1842
1843```json
1844{
1845 "terminal": {
1846 "blinking": "terminal_controlled"
1847 }
1848}
1849```
1850
18513. Always blink the cursor, ignore the terminal mode
1852
1853```json
1854{
1855 "terminal": {
1856 "blinking": "on"
1857 }
1858}
1859```
1860
1861### Terminal: Copy On Select
1862
1863- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1864- Setting: `copy_on_select`
1865- Default: `false`
1866
1867**Options**
1868
1869`boolean` values
1870
1871**Example**
1872
1873```json
1874{
1875 "terminal": {
1876 "copy_on_select": true
1877 }
1878}
1879```
1880
1881### Terminal: Env
1882
1883- 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
1884- Setting: `env`
1885- Default: `{}`
1886
1887**Example**
1888
1889```json
1890{
1891 "terminal": {
1892 "env": {
1893 "ZED": "1",
1894 "KEY": "value1:value2"
1895 }
1896 }
1897}
1898```
1899
1900### Terminal: Font Size
1901
1902- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1903- Setting: `font_size`
1904- Default: `null`
1905
1906**Options**
1907
1908`integer` values
1909
1910```json
1911{
1912 "terminal": {
1913 "font_size": 15
1914 }
1915}
1916```
1917
1918### Terminal: Font Family
1919
1920- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1921- Setting: `font_family`
1922- Default: `null`
1923
1924**Options**
1925
1926The name of any font family installed on the user's system
1927
1928```json
1929{
1930 "terminal": {
1931 "font_family": "Berkeley Mono"
1932 }
1933}
1934```
1935
1936### Terminal: Font Features
1937
1938- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1939- Setting: `font_features`
1940- Default: `null`
1941- Platform: macOS and Windows.
1942
1943**Options**
1944
1945See Buffer Font Features
1946
1947```json
1948{
1949 "terminal": {
1950 "font_features": {
1951 "calt": false
1952 // See Buffer Font Features for more features
1953 }
1954 }
1955}
1956```
1957
1958### Terminal: Line Height
1959
1960- Description: Set the terminal's line height.
1961- Setting: `line_height`
1962- Default: `comfortable`
1963
1964**Options**
1965
19661. Use a line height that's `comfortable` for reading, 1.618. (default)
1967
1968```json
1969{
1970 "terminal": {
1971 "line_height": "comfortable"
1972 }
1973}
1974```
1975
19762. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
1977
1978```json
1979{
1980 "terminal": {
1981 "line_height": "standard"
1982 }
1983}
1984```
1985
19863. Use a custom line height.
1987
1988```json
1989{
1990 "terminal": {
1991 "line_height": {
1992 "custom": 2
1993 }
1994 }
1995}
1996```
1997
1998### Terminal: Option As Meta
1999
2000- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
2001- Setting: `option_as_meta`
2002- Default: `false`
2003
2004**Options**
2005
2006`boolean` values
2007
2008```json
2009{
2010 "terminal": {
2011 "option_as_meta": true
2012 }
2013}
2014```
2015
2016### Terminal: Shell
2017
2018- Description: What shell to use when launching the terminal.
2019- Setting: `shell`
2020- Default: `system`
2021
2022**Options**
2023
20241. Use the system's default terminal configuration (usually the `/etc/passwd` file).
2025
2026```json
2027{
2028 "terminal": {
2029 "shell": "system"
2030 }
2031}
2032```
2033
20342. A program to launch:
2035
2036```json
2037{
2038 "terminal": {
2039 "shell": {
2040 "program": "sh"
2041 }
2042 }
2043}
2044```
2045
20463. A program with arguments:
2047
2048```json
2049{
2050 "terminal": {
2051 "shell": {
2052 "with_arguments": {
2053 "program": "/bin/bash",
2054 "args": ["--login"]
2055 }
2056 }
2057 }
2058}
2059```
2060
2061## Terminal: Detect Virtual Environments {#terminal-detect_venv}
2062
2063- 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.
2064- Setting: `detect_venv`
2065- Default:
2066
2067```json
2068{
2069 "terminal": {
2070 "detect_venv": {
2071 "on": {
2072 // Default directories to search for virtual environments, relative
2073 // to the current working directory. We recommend overriding this
2074 // in your project's settings, rather than globally.
2075 "directories": [".venv", "venv"],
2076 // Can also be `csh`, `fish`, and `nushell`
2077 "activate_script": "default"
2078 }
2079 }
2080 }
2081}
2082```
2083
2084Disable with:
2085
2086```json
2087{
2088 "terminal": {
2089 "detect_venv": "off"
2090 }
2091}
2092```
2093
2094## Terminal: Toolbar
2095
2096- Description: Whether or not to show various elements in the terminal toolbar.
2097- Setting: `toolbar`
2098- Default:
2099
2100```json
2101{
2102 "terminal": {
2103 "toolbar": {
2104 "breadcrumbs": true
2105 }
2106 }
2107}
2108```
2109
2110**Options**
2111
2112At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
2113
2114If the terminal title is empty, the breadcrumbs won't be shown.
2115
2116The shell running in the terminal needs to be configured to emit the title.
2117
2118Example command to set the title: `echo -e "\e]2;New Title\007";`
2119
2120### Terminal: Button
2121
2122- Description: Control to show or hide the terminal button in the status bar
2123- Setting: `button`
2124- Default: `true`
2125
2126**Options**
2127
2128`boolean` values
2129
2130```json
2131{
2132 "terminal": {
2133 "button": false
2134 }
2135}
2136```
2137
2138### Terminal: Working Directory
2139
2140- Description: What working directory to use when launching the terminal.
2141- Setting: `working_directory`
2142- Default: `"current_project_directory"`
2143
2144**Options**
2145
21461. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2147
2148```json
2149{
2150 "terminal": {
2151 "working_directory": "current_project_directory"
2152 }
2153}
2154```
2155
21562. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2157
2158```json
2159{
2160 "terminal": {
2161 "working_directory": "first_project_directory"
2162 }
2163}
2164```
2165
21663. Always use this platform's home directory (if we can find it)
2167
2168```json
2169{
2170 "terminal": {
2171 "working_directory": "always_home"
2172 }
2173}
2174```
2175
21764. 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.
2177
2178```json
2179{
2180 "terminal": {
2181 "working_directory": {
2182 "always": {
2183 "directory": "~/zed/projects/"
2184 }
2185 }
2186 }
2187}
2188```
2189
2190## Theme
2191
2192- 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.
2193- Setting: `theme`
2194- Default: `One Dark`
2195
2196### Theme Object
2197
2198- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
2199- Setting: `theme`
2200- Default:
2201
2202```json
2203"theme": {
2204 "mode": "system",
2205 "dark": "One Dark",
2206 "light": "One Light"
2207},
2208```
2209
2210### Mode
2211
2212- Description: Specify theme mode.
2213- Setting: `mode`
2214- Default: `system`
2215
2216**Options**
2217
22181. Set the theme to dark mode
2219
2220```json
2221{
2222 "mode": "dark"
2223}
2224```
2225
22262. Set the theme to light mode
2227
2228```json
2229{
2230 "mode": "light"
2231}
2232```
2233
22343. Set the theme to system mode
2235
2236```json
2237{
2238 "mode": "system"
2239}
2240```
2241
2242### Dark
2243
2244- Description: The name of the dark Zed theme to use for the UI.
2245- Setting: `dark`
2246- Default: `One Dark`
2247
2248**Options**
2249
2250Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2251
2252### Light
2253
2254- Description: The name of the light Zed theme to use for the UI.
2255- Setting: `light`
2256- Default: `One Light`
2257
2258**Options**
2259
2260Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2261
2262## Vim
2263
2264- Description: Whether or not to enable vim mode (work in progress).
2265- Setting: `vim_mode`
2266- Default: `false`
2267
2268## Project Panel
2269
2270- Description: Customize project panel
2271- Setting: `project_panel`
2272- Default:
2273
2274```json
2275{
2276 "project_panel": {
2277 "button": true,
2278 "default_width": 240,
2279 "dock": "left",
2280 "entry_spacing": "comfortable",
2281 "file_icons": true,
2282 "folder_icons": true,
2283 "git_status": true,
2284 "indent_size": 20,
2285 "indent_guides": true,
2286 "auto_reveal_entries": true,
2287 "auto_fold_dirs": true,
2288 "scrollbar": {
2289 "show": null
2290 },
2291 "indent_guides": {
2292 "show": "always"
2293 }
2294 }
2295}
2296```
2297
2298### Dock
2299
2300- Description: Control the position of the dock
2301- Setting: `dock`
2302- Default: `left`
2303
2304**Options**
2305
23061. Default dock position to left
2307
2308```json
2309{
2310 "dock": "left"
2311}
2312```
2313
23142. Default dock position to right
2315
2316```json
2317{
2318 "dock": "right"
2319}
2320```
2321
2322### Entry Spacing
2323
2324- Description: Spacing between worktree entries
2325- Setting: `entry_spacing`
2326- Default: `comfortable`
2327
2328**Options**
2329
23301. Comfortable entry spacing
2331
2332```json
2333{
2334 "entry_spacing": "comfortable"
2335}
2336```
2337
23382. Standard entry spacing
2339
2340```json
2341{
2342 "entry_spacing": "standard"
2343}
2344```
2345
2346### Git Status
2347
2348- Description: Indicates newly created and updated files
2349- Setting: `git_status`
2350- Default: `true`
2351
2352**Options**
2353
23541. Default enable git status
2355
2356```json
2357{
2358 "git_status": true
2359}
2360```
2361
23622. Default disable git status
2363
2364```json
2365{
2366 "git_status": false
2367}
2368```
2369
2370### Default Width
2371
2372- Description: Customize default width taken by project panel
2373- Setting: `default_width`
2374- Default: N/A width in pixels (eg: 420)
2375
2376**Options**
2377
2378`boolean` values
2379
2380### Auto Reveal Entries
2381
2382- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
2383- Setting: `auto_reveal_entries`
2384- Default: `true`
2385
2386**Options**
2387
23881. Enable auto reveal entries
2389
2390```json
2391{
2392 "auto_reveal_entries": true
2393}
2394```
2395
23962. Disable auto reveal entries
2397
2398```json
2399{
2400 "auto_reveal_entries": false
2401}
2402```
2403
2404### Auto Fold Dirs
2405
2406- Description: Whether to fold directories automatically when directory has only one directory inside.
2407- Setting: `auto_fold_dirs`
2408- Default: `true`
2409
2410**Options**
2411
24121. Enable auto fold dirs
2413
2414```json
2415{
2416 "auto_fold_dirs": true
2417}
2418```
2419
24202. Disable auto fold dirs
2421
2422```json
2423{
2424 "auto_fold_dirs": false
2425}
2426```
2427
2428### Indent Size
2429
2430- Description: Amount of indentation (in pixels) for nested items.
2431- Setting: `indent_size`
2432- Default: `20`
2433
2434### Indent Guides: Show
2435
2436- Description: Whether to show indent guides in the project panel. Possible values: "always", "never".
2437- Setting: `indent_guides`
2438
2439```json
2440"indent_guides": {
2441 "show": "always"
2442}
2443```
2444
2445**Options**
2446
24471. Show indent guides in the project panel
2448
2449```json
2450{
2451 "indent_guides": {
2452 "show": "always"
2453 }
2454}
2455```
2456
24572. Hide indent guides in the project panel
2458
2459```json
2460{
2461 "indent_guides": {
2462 "show": "never"
2463 }
2464}
2465```
2466
2467### Scrollbar: Show
2468
2469- 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.
2470- Setting: `scrollbar`
2471- Default:
2472
2473```json
2474"scrollbar": {
2475 "show": null
2476}
2477```
2478
2479**Options**
2480
24811. Show scrollbar in the project panel
2482
2483```json
2484{
2485 "scrollbar": {
2486 "show": "always"
2487 }
2488}
2489```
2490
24912. Hide scrollbar in the project panel
2492
2493```json
2494{
2495 "scrollbar": {
2496 "show": "never"
2497 }
2498}
2499```
2500
2501## Assistant Panel
2502
2503- Description: Customize assistant panel
2504- Setting: `assistant`
2505- Default:
2506
2507```json
2508"assistant": {
2509 "enabled": true,
2510 "button": true,
2511 "dock": "right",
2512 "default_width": 640,
2513 "default_height": 320,
2514 "provider": "openai",
2515 "version": "1",
2516},
2517```
2518
2519## Outline Panel
2520
2521- Description: Customize outline Panel
2522- Setting: `outline_panel`
2523- Default:
2524
2525```json
2526"outline_panel": {
2527 "button": true,
2528 "default_width": 240,
2529 "dock": "left",
2530 "file_icons": true,
2531 "folder_icons": true,
2532 "git_status": true,
2533 "indent_size": 20,
2534 "auto_reveal_entries": true,
2535 "auto_fold_dirs": true,
2536 "indent_guides": {
2537 "show": "always"
2538 },
2539 "scrollbar": {
2540 "show": null
2541 }
2542}
2543```
2544
2545## Calls
2546
2547- Description: Customize behavior when participating in a call
2548- Setting: `calls`
2549- Default:
2550
2551```json
2552"calls": {
2553 // Join calls with the microphone live by default
2554 "mute_on_join": false,
2555 // Share your project when you are the first to join a channel
2556 "share_on_join": false
2557},
2558```
2559
2560## Unnecessary Code Fade
2561
2562- Description: How much to fade out unused code.
2563- Setting: `unnecessary_code_fade`
2564- Default: `0.3`
2565
2566**Options**
2567
2568Float values between `0.0` and `0.9`, where:
2569
2570- `0.0` means no fading (unused code looks the same as used code)
2571- `0.9` means maximum fading (unused code is very faint but still visible)
2572
2573**Example**
2574
2575```json
2576{
2577 "unnecessary_code_fade": 0.5
2578}
2579```
2580
2581## UI Font Family
2582
2583- Description: The name of the font to use for text in the UI.
2584- Setting: `ui_font_family`
2585- Default: `Zed Plex Sans`
2586
2587**Options**
2588
2589The name of any font family installed on the system.
2590
2591## UI Font Features
2592
2593- Description: The OpenType features to enable for text in the UI.
2594- Setting: `ui_font_features`
2595- Default: `null`
2596- Platform: macOS and Windows.
2597
2598**Options**
2599
2600Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
2601
2602For example, to disable font ligatures, add the following to your settings:
2603
2604```json
2605{
2606 "ui_font_features": {
2607 "calt": false
2608 }
2609}
2610```
2611
2612You can also set other OpenType features, like setting `cv01` to `7`:
2613
2614```json
2615{
2616 "ui_font_features": {
2617 "cv01": 7
2618 }
2619}
2620```
2621
2622## UI Font Fallbacks
2623
2624- Description: The font fallbacks to use for text in the UI.
2625- Setting: `ui_font_fallbacks`
2626- Default: `null`
2627- Platform: macOS and Windows.
2628
2629**Options**
2630
2631For example, to use `Nerd Font` as a fallback, add the following to your settings:
2632
2633```json
2634{
2635 "ui_font_fallbacks": ["Nerd Font"]
2636}
2637```
2638
2639## UI Font Size
2640
2641- Description: The default font size for text in the UI.
2642- Setting: `ui_font_size`
2643- Default: `16`
2644
2645**Options**
2646
2647`integer` values from `6` to `100` pixels (inclusive)
2648
2649## UI Font Weight
2650
2651- Description: The default font weight for text in the UI.
2652- Setting: `ui_font_weight`
2653- Default: `400`
2654
2655**Options**
2656
2657`integer` values between `100` and `900`
2658
2659## An example configuration:
2660
2661```json
2662// ~/.config/zed/settings.json
2663{
2664 "theme": "cave-light",
2665 "tab_size": 2,
2666 "preferred_line_length": 80,
2667 "soft_wrap": "none",
2668
2669 "buffer_font_size": 18,
2670 "buffer_font_family": "Zed Plex Mono",
2671
2672 "autosave": "on_focus_change",
2673 "format_on_save": "off",
2674 "vim_mode": false,
2675 "projects_online_by_default": true,
2676 "terminal": {
2677 "font_family": "FiraCode Nerd Font Mono",
2678 "blinking": "off"
2679 },
2680 "languages": {
2681 "C": {
2682 "format_on_save": "language_server",
2683 "preferred_line_length": 64,
2684 "soft_wrap": "preferred_line_length"
2685 }
2686 }
2687}
2688```