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