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
9Your settings file can be opened with `cmd-,` (on macOS) or `ctrl-,` (on Linux). 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.
10
11This configuration is merged with any local configuration inside your projects. You can open the project settings by running `zed: Open Local Settings` from the command palette. This will create a `.zed` directory containing`.zed/settings.json`.
12
13Although 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 behaviour of the editor and language tooling. For example you can set `tab_size`, `formatter` etc. but not `theme`, `vim_mode` and similar.
14
15The syntax for configuration files is a super-set of JSON that allows `//` comments.
16
17## Default settings
18
19You can find the default settings for your current Zed by running `zed: Open Default Settings` from the command palette.
20
21Extensions that provide language servers may also provide default settings for those language servers.
22
23# Settings
24
25## Active Pane Magnification
26
27- 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.
28- Setting: `active_pane_magnification`
29- Default: `1.0`
30
31**Options**
32
33`float` values
34
35## Autosave
36
37- Description: When to automatically save edited buffers.
38- Setting: `autosave`
39- Default: `off`
40
41**Options**
42
431. To disable autosave, set it to `off`:
44
45```json
46{
47 "autosave": "off"
48}
49```
50
512. To autosave when focus changes, use `on_focus_change`:
52
53```json
54{
55 "autosave": "on_focus_change"
56}
57```
58
593. To autosave when the active window changes, use `on_window_change`:
60
61```json
62{
63 "autosave": "on_window_change"
64}
65```
66
674. To autosave after an inactivity period, use `after_delay`:
68
69```json
70{
71 "autosave": {
72 "after_delay": {
73 "milliseconds": 1000
74 }
75 }
76}
77```
78
79## Auto Update
80
81- Description: Whether or not to automatically check for updates.
82- Setting: `auto_update`
83- Default: `true`
84
85**Options**
86
87`boolean` values
88
89## Buffer Font Family
90
91- Description: The name of a font to use for rendering text in the editor.
92- Setting: `buffer_font_family`
93- Default: `Zed Plex Mono`
94
95**Options**
96
97The name of any font family installed on the user's system
98
99## Buffer Font Features
100
101- Description: The OpenType features to enable for text in the editor.
102- Setting: `buffer_font_features`
103- Default: `null`
104
105**Options**
106
107Zed 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.
108
109For example, to disable font ligatures, add the following to your settings:
110
111```json
112{
113 "buffer_font_features": {
114 "calt": false
115 }
116}
117```
118
119You can also set other OpenType features, like setting `cv01` to `7`:
120
121```json
122{
123 "buffer_font_features": {
124 "cv01": 7
125 }
126}
127```
128
129## Buffer Font Size
130
131- Description: The default font size for text in the editor.
132- Setting: `buffer_font_size`
133- Default: `15`
134
135**Options**
136
137`integer` values
138
139## Buffer Font Weight
140
141- Description: The default font weight for text in the editor.
142- Setting: `buffer_font_weight`
143- Default: `400`
144
145**Options**
146
147`integer` values between `100` and `900`
148
149## Buffer Line Height
150
151- Description: The default line height for text in the editor.
152- Setting: `buffer_line_height`
153- Default: `"comfortable"`
154
155**Options**
156
157`"standard"`, `"comfortable"` or `{"custom": float}` (`1` is very compact, `2` very loose)
158
159## Confirm Quit
160
161- Description: Whether or not to prompt the user to confirm before closing the application.
162- Setting: `confirm_quit`
163- Default: `false`
164
165**Options**
166
167`boolean` values
168
169## Centered Layout
170
171- Description: Configuration for the centered layout mode.
172- Setting: `centered_layout`
173- Default:
174
175```json
176"centered_layout": {
177 "left_padding": 0.2,
178 "right_padding": 0.2,
179}
180```
181
182**Options**
183
184The `left_padding` and `right_padding` options define the relative width of the
185left 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`.
186
187## Direnv Integration
188
189- Description: Settings for [direnv](https://direnv.net/) integration. Requires `direnv` to be installed. `direnv` integration currently only means that the environment variables set by a `direnv` configuration can be used to detect some language servers in `$PATH` instead of installing them.
190- Setting: `load_direnv`
191- Default:
192
193```json
194"load_direnv": "shell_hook"
195```
196
197**Options**
198There are two options to choose from:
199
2001. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
2012. `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.
202
203## Inline Completions
204
205- Description: Settings for inline completions.
206- Setting: `inline_completions`
207- Default:
208
209```json
210"inline_completions": {
211 "disabled_globs": [
212 ".env"
213 ]
214}
215```
216
217**Options**
218
219### Disabled Globs
220
221- Description: A list of globs representing files that inline completions should be disabled for.
222- Setting: `disabled_globs`
223- Default: [".env"]
224
225**Options**
226
227List of `string` values
228
229## Current Line Highlight
230
231- Description: How to highlight the current line in the editor.
232- Setting: `current_line_highlight`
233- Default: `all`
234
235**Options**
236
2371. Don't highlight the current line:
238
239```json
240"current_line_highlight": "none"
241```
242
2432. Highlight the gutter area:
244
245```json
246"current_line_highlight": "gutter"
247```
248
2493. Highlight the editor area:
250
251```json
252"current_line_highlight": "line"
253```
254
2554. Highlight the full line:
256
257```json
258"current_line_highlight": "all"
259```
260
261## Cursor Blink
262
263- Description: Whether or not the cursor blinks.
264- Setting: `cursor_blink`
265- Default: `true`
266
267**Options**
268
269`boolean` values
270
271## Default Dock Anchor
272
273- Description: The default anchor for new docks.
274- Setting: `default_dock_anchor`
275- Default: `bottom`
276
277**Options**
278
2791. Position the dock attached to the bottom of the workspace: `bottom`
2802. Position the dock to the right of the workspace like a side panel: `right`
2813. Position the dock full screen over the entire workspace: `expanded`
282
283## Editor Scrollbar
284
285- Description: Whether or not to show the editor scrollbar and various elements in it.
286- Setting: `scrollbar`
287- Default:
288
289```json
290"scrollbar": {
291 "show": "auto",
292 "cursors": true,
293 "git_diff": true,
294 "search_results": true,
295 "selected_symbol": true,
296 "diagnostics": true
297},
298```
299
300### Show Mode
301
302- Description: When to show the editor scrollbar.
303- Setting: `show`
304- Default: `auto`
305
306**Options**
307
3081. Show the scrollbar if there's important information or follow the system's configured behavior:
309
310```json
311"scrollbar": {
312 "show": "auto"
313}
314```
315
3162. Match the system's configured behavior:
317
318```json
319"scrollbar": {
320 "show": "system"
321}
322```
323
3243. Always show the scrollbar:
325
326```json
327"scrollbar": {
328 "show": "always"
329}
330```
331
3324. Never show the scrollbar:
333
334```json
335"scrollbar": {
336 "show": "never"
337}
338```
339
340### Cursor Indicators
341
342- Description: Whether to show cursor positions in the scrollbar.
343- Setting: `cursors`
344- Default: `true`
345
346**Options**
347
348`boolean` values
349
350### Git Diff Indicators
351
352- Description: Whether to show git diff indicators in the scrollbar.
353- Setting: `git_diff`
354- Default: `true`
355
356**Options**
357
358`boolean` values
359
360### Search Results Indicators
361
362- Description: Whether to show buffer search results in the scrollbar.
363- Setting: `search_results`
364- Default: `true`
365
366**Options**
367
368`boolean` values
369
370### Selected Symbols Indicators
371
372- Description: Whether to show selected symbol occurrences in the scrollbar.
373- Setting: `selected_symbol`
374- Default: `true`
375
376**Options**
377
378`boolean` values
379
380### Diagnostics
381
382- Description: Whether to show diagnostic indicators in the scrollbar.
383- Setting: `diagnostics`
384- Default: `true`
385
386**Options**
387
388`boolean` values
389
390## Editor Tab Bar
391
392- Description: Settings related to the editor's tab bar.
393- Settings: `tab_bar`
394- Default:
395
396```json
397"tab_bar": {
398 "show": true,
399 "show_nav_history_buttons": true
400}
401```
402
403### Show
404
405- Description: Whether or not to show the tab bar in the editor.
406- Setting: `show`
407- Default: `true`
408
409**Options**
410
411`boolean` values
412
413### Navigation History Buttons
414
415- Description: Whether or not to show the navigation history buttons.
416- Setting: `show_nav_history_buttons`
417- Default: `true`
418
419**Options**
420
421`boolean` values
422
423## Editor Tabs
424
425- Description: Configuration for the editor tabs.
426- Setting: `tabs`
427- Default:
428
429```json
430"tabs": {
431 "close_position": "right",
432 "file_icons": false,
433 "git_status": false
434},
435```
436
437### Close Position
438
439- Description: Where to display close button within a tab.
440- Setting: `close_position`
441- Default: `right`
442
443**Options**
444
4451. Display the close button on the right:
446
447```json
448{
449 "close_position": "right"
450}
451```
452
4532. Display the close button on the left:
454
455```json
456{
457 "close_position": "left"
458}
459```
460
461### File Icons
462
463- Description: Whether to show the file icon for a tab.
464- Setting: `file_icons`
465- Default: `false`
466
467### Git Status
468
469- Description: Whether or not to show Git file status in tab.
470- Setting: `git_status`
471- Default: `false`
472
473## Editor Toolbar
474
475- Description: Whether or not to show various elements in the editor toolbar.
476- Setting: `toolbar`
477- Default:
478
479```json
480"toolbar": {
481 "breadcrumbs": true,
482 "quick_actions": true
483},
484```
485
486**Options**
487
488Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
489
490## Enable Language Server
491
492- Description: Whether or not to use language servers to provide code intelligence.
493- Setting: `enable_language_server`
494- Default: `true`
495
496**Options**
497
498`boolean` values
499
500## Ensure Final Newline On Save
501
502- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
503- Setting: `ensure_final_newline_on_save`
504- Default: `true`
505
506**Options**
507
508`boolean` values
509
510## LSP
511
512- Description: Configuration for language servers.
513- Setting: `lsp`
514- Default: `null`
515
516**Options**
517
518The following settings can be overridden for specific language servers:
519
520- `initialization_options`
521
522To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
523
524```json
525"lsp": {
526 "rust-analyzer": {
527 "initialization_options": {
528 "check": {
529 "command": "clippy" // rust-analyzer.check.command (default: "check")
530 }
531 }
532 }
533}
534```
535
536## Format On Save
537
538- Description: Whether or not to perform a buffer format before saving.
539- Setting: `format_on_save`
540- Default: `on`
541
542**Options**
543
5441. `on`, enables format on save obeying `formatter` setting:
545
546```json
547{
548 "format_on_save": "on"
549}
550```
551
5522. `off`, disables format on save:
553
554```json
555{
556 "format_on_save": "off"
557}
558```
559
560## Formatter
561
562- Description: How to perform a buffer format.
563- Setting: `formatter`
564- Default: `auto`
565
566**Options**
567
5681. To use the current language server, use `"language_server"`:
569
570```json
571{
572 "formatter": "language_server"
573}
574```
575
5762. 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):
577
578```json
579{
580 "formatter": {
581 "external": {
582 "command": "sed",
583 "arguments": ["-e", "s/ *$//"]
584 }
585 }
586}
587```
588
5893. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
590
591```json
592{
593 "formatter": {
594 "code_actions": {
595 // Use ESLint's --fix:
596 "source.fixAll.eslint": true,
597 // Organize imports on save:
598 "source.organizeImports": true
599 }
600 }
601}
602```
603
604## Code Actions On Format
605
606- Description: The code actions to perform with the primary language server when formatting the buffer.
607- Setting: `code_actions_on_format`
608- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
609
610**Examples**
611
6121. Organize imports on format in TypeScript and TSX buffers:
613
614```json
615{
616 "languages": {
617 "TypeScript": {
618 "code_actions_on_format": {
619 "source.organizeImports": true
620 }
621 },
622 "TSX": {
623 "code_actions_on_format": {
624 "source.organizeImports": true
625 }
626 }
627 }
628}
629```
630
6312. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
632
633```json
634{
635 "languages": {
636 "JavaScript": {
637 "code_actions_on_format": {
638 "source.fixAll.eslint": true
639 }
640 }
641 }
642}
643```
644
6453. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
646
647```json
648{
649 "languages": {
650 "JavaScript": {
651 "code_actions_on_format": {
652 "source.fixAll.eslint": true
653 }
654 }
655 },
656 "lsp": {
657 "eslint": {
658 "settings": {
659 "codeActionOnSave": {
660 "rules": ["import/order"]
661 }
662 }
663 }
664 }
665}
666```
667
668## Auto close
669
670- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
671- Setting: `use_autoclose`
672- Default: `true`
673
674**Options**
675
676`boolean` values
677
678## Always Treat Brackets As Autoclosed
679
680- Description: Controls how the editor handles the autoclosed characters.
681- Setting: `always_treat_brackets_as_autoclosed`
682- Default: `false`
683
684**Options**
685
686`boolean` values
687
688**Example**
689
690If the setting is set to `true`:
691
6921. Enter in the editor: `)))`
6932. Move the cursor to the start: `^)))`
6943. Enter again: `)))`
695
696The result is still `)))` and not `))))))`, which is what it would be by default.
697
698## File Types
699
700- Setting: `file_types`
701- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
702- Default: `{}`
703
704**Examples**
705
706To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
707
708```json
709{
710 "file_types": {
711 "C++": ["c"],
712 "TOML": ["MyLockFile"],
713 "Dockerfile": ["Dockerfile*"]
714 }
715}
716```
717
718## Git
719
720- Description: Configuration for git-related features.
721- Setting: `git`
722- Default:
723
724```json
725{
726 "git": {
727 "git_gutter": "tracked_files",
728 "inline_blame": {
729 "enabled": true
730 }
731 }
732}
733```
734
735### Git Gutter
736
737- Description: Whether or not to show the git gutter.
738- Setting: `git_gutter`
739- Default: `tracked_files`
740
741**Options**
742
7431. Show git gutter in tracked files
744
745```json
746{
747 "git": {
748 "git_gutter": "tracked_files"
749 }
750}
751```
752
7532. Hide git gutter
754
755```json
756{
757 "git": {
758 "git_gutter": "hide"
759 }
760}
761```
762
763### Indent Guides
764
765- Description: Configuration related to indent guides (requires Zed `0.138.0`). Indent guides can be configured separately for each language.
766- Setting: `indent_guides`
767- Default:
768
769```json
770{
771 "indent_guides": {
772 "enabled": true,
773 "line_width": 1,
774 "active_line_width": 1,
775 "coloring": "fixed",
776 "background_coloring": "disabled"
777 }
778}
779```
780
781**Options**
782
7831. Disable indent guides
784
785```json
786{
787 "indent_guides": {
788 "enabled": false
789 }
790}
791```
792
7932. Enable indent guides for a specific language.
794
795```json
796{
797 "languages": {
798 "Python": {
799 "indent_guides": {
800 "enabled": true
801 }
802 }
803 }
804}
805```
806
8073. Enable indent aware coloring ("rainbow indentation").
808 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.
809
810```json
811{
812 "indent_guides": {
813 "enabled": true,
814 "coloring": "indent_aware"
815 }
816}
817```
818
8194. Enable indent aware background coloring ("rainbow indentation").
820 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.
821
822```json
823{
824 "indent_guides": {
825 "enabled": true,
826 "coloring": "indent_aware",
827 "background_coloring": "indent_aware"
828 }
829}
830```
831
832### Inline Git Blame
833
834- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
835- Setting: `inline_blame`
836- Default:
837
838```json
839{
840 "git": {
841 "inline_blame": {
842 "enabled": true
843 }
844 }
845}
846```
847
848**Options**
849
8501. Disable inline git blame:
851
852```json
853{
854 "git": {
855 "inline_blame": {
856 "enabled": false
857 }
858 }
859}
860```
861
8622. Only show inline git blame after a delay (that starts after cursor stops moving):
863
864```json
865{
866 "git": {
867 "inline_blame": {
868 "enabled": false,
869 "delay_ms": 500
870 }
871 }
872}
873```
874
875## Hard Tabs
876
877- Description: Whether to indent lines using tab characters or multiple spaces.
878- Setting: `hard_tabs`
879- Default: `false`
880
881**Options**
882
883`boolean` values
884
885## Hover Popover Enabled
886
887- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
888- Setting: `hover_popover_enabled`
889- Default: `true`
890
891**Options**
892
893`boolean` values
894
895## Inlay hints
896
897- Description: Configuration for displaying extra text with hints in the editor.
898- Setting: `inlay_hints`
899- Default:
900
901```json
902"inlay_hints": {
903 "enabled": false,
904 "show_type_hints": true,
905 "show_parameter_hints": true,
906 "show_other_hints": true,
907 "edit_debounce_ms": 700,
908 "scroll_debounce_ms": 50
909}
910```
911
912**Options**
913
914Inlay hints querying consists of two parts: editor (client) and LSP server.
915With 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.
916At 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.
917
918The following languages have inlay hints preconfigured by Zed:
919
920- [Go](https://docs.zed.dev/languages/go)
921- [Rust](https://docs.zed.dev/languages/rust)
922- [Svelte](https://docs.zed.dev/languages/svelte)
923- [Typescript](https://docs.zed.dev/languages/typescript)
924
925Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
926
927Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
928Settings-related hint updates are not debounced.
929
930## Journal
931
932- Description: Configuration for the journal.
933- Setting: `journal`
934- Default:
935
936```json
937"journal": {
938 "path": "~",
939 "hour_format": "hour12"
940}
941```
942
943### Path
944
945- Description: The path of the directory where journal entries are stored.
946- Setting: `path`
947- Default: `~`
948
949**Options**
950
951`string` values
952
953### Hour Format
954
955- Description: The format to use for displaying hours in the journal.
956- Setting: `hour_format`
957- Default: `hour12`
958
959**Options**
960
9611. 12-hour format:
962
963```json
964{
965 "hour_format": "hour12"
966}
967```
968
9692. 24-hour format:
970
971```json
972{
973 "hour_format": "hour24"
974}
975```
976
977## Languages
978
979- Description: Configuration for specific languages.
980- Setting: `languages`
981- Default: `null`
982
983**Options**
984
985To override settings for a language, add an entry for that languages name to the `languages` value. Example:
986
987```json
988"languages": {
989 "C": {
990 "format_on_save": "off",
991 "preferred_line_length": 64,
992 "soft_wrap": "preferred_line_length"
993 },
994 "JSON": {
995 "tab_size": 4
996 }
997}
998```
999
1000The following settings can be overridden for each specific language:
1001
1002- `enable_language_server`
1003- `ensure_final_newline_on_save`
1004- `format_on_save`
1005- `formatter`
1006- `hard_tabs`
1007- `preferred_line_length`
1008- `remove_trailing_whitespace_on_save`
1009- `show_inline_completions`
1010- `show_whitespaces`
1011- `soft_wrap`
1012- `tab_size`
1013- `use_autoclose`
1014- `always_treat_brackets_as_autoclosed`
1015
1016These values take in the same options as the root-level settings with the same name.
1017
1018## Preview tabs
1019
1020- Description:
1021 (requires Zed `0.132.x`) \
1022 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. \
1023 There are several ways to convert a preview tab into a regular tab:
1024
1025 - Double-clicking on the file
1026 - Double-clicking on the tab header
1027 - Using the `project_panel::OpenPermanent` action
1028 - Editing the file
1029 - Dragging the file to a different pane
1030
1031- Setting: `preview_tabs`
1032- Default:
1033
1034```json
1035"preview_tabs": {
1036 "enabled": true,
1037 "enable_preview_from_file_finder": false,
1038 "enable_preview_from_code_navigation": false,
1039}
1040```
1041
1042### Enable preview from file finder
1043
1044- Description: Determines whether to open files in preview mode when selected from the file finder.
1045- Setting: `enable_preview_from_file_finder`
1046- Default: `false`
1047
1048**Options**
1049
1050`boolean` values
1051
1052### Enable preview from code navigation
1053
1054- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab (requires Zed `0.134.x`).
1055- Setting: `enable_preview_from_code_navigation`
1056- Default: `false`
1057
1058**Options**
1059
1060`boolean` values
1061
1062## Preferred Line Length
1063
1064- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1065- Setting: `preferred_line_length`
1066- Default: `80`
1067
1068**Options**
1069
1070`integer` values
1071
1072## Projects Online By Default
1073
1074- Description: Whether or not to show the online projects view by default.
1075- Setting: `projects_online_by_default`
1076- Default: `true`
1077
1078**Options**
1079
1080`boolean` values
1081
1082## Remove Trailing Whitespace On Save
1083
1084- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1085- Setting: `remove_trailing_whitespace_on_save`
1086- Default: `true`
1087
1088**Options**
1089
1090`boolean` values
1091
1092## Show Call Status Icon
1093
1094- Description: Whether or not to show the call status icon in the status bar.
1095- Setting: `show_call_status_icon`
1096- Default: `true`
1097
1098**Options**
1099
1100`boolean` values
1101
1102## Show Completions On Input
1103
1104- Description: Whether or not to show completions as you type.
1105- Setting: `show_completions_on_input`
1106- Default: `true`
1107
1108**Options**
1109
1110`boolean` values
1111
1112## Show Completion Documentation
1113
1114- Description: Whether to display inline and alongside documentation for items in the completions menu.
1115- Setting: `show_completion_documentation`
1116- Default: `true`
1117
1118**Options**
1119
1120`boolean` values
1121
1122## Completion Documentation Debounce Delay
1123
1124- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1125- Setting: `completion_documentation_secondary_query_debounce`
1126- Default: `300` ms
1127
1128**Options**
1129
1130`integer` values
1131
1132## Show Inline Completions
1133
1134- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1135- Setting: `show_inline_completions`
1136- Default: `true`
1137
1138**Options**
1139
1140`boolean` values
1141
1142## Show Whitespaces
1143
1144- Description: Whether or not to show render whitespace characters in the editor.
1145- Setting: `show_whitespaces`
1146- Default: `selection`
1147
1148**Options**
1149
11501. `all`
11512. `selection`
11523. `none`
11534. `boundary`
1154
1155## Soft Wrap
1156
1157- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1158- Setting: `soft_wrap`
1159- Default: `prefer_line`
1160
1161**Options**
1162
11631. `none` to stop the soft-wrapping
11642. `prefer_line` to avoid wrapping generally, unless the line is too long
11653. `editor_width` to wrap lines that overflow the editor width
11664. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
1167
1168## Wrap Guides (Vertical Rulers)
1169
1170- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1171- Setting: `wrap_guides`
1172- Default: []
1173
1174**Options**
1175
1176List of `integer` column numbers
1177
1178## Tab Size
1179
1180- Description: The number of spaces to use for each tab character.
1181- Setting: `tab_size`
1182- Default: `4`
1183
1184**Options**
1185
1186`integer` values
1187
1188## Telemetry
1189
1190- Description: Control what info is collected by Zed.
1191- Setting: `telemetry`
1192- Default:
1193
1194```json
1195"telemetry": {
1196 "diagnostics": true,
1197 "metrics": true
1198},
1199```
1200
1201**Options**
1202
1203### Diagnostics
1204
1205- Description: Setting for sending debug-related data, such as crash reports.
1206- Setting: `diagnostics`
1207- Default: `true`
1208
1209**Options**
1210
1211`boolean` values
1212
1213### Metrics
1214
1215- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1216- Setting: `metrics`
1217- Default: `true`
1218
1219**Options**
1220
1221`boolean` values
1222
1223## Terminal
1224
1225- Description: Configuration for the terminal.
1226- Setting: `terminal`
1227- Default:
1228
1229```json
1230"terminal": {
1231 "alternate_scroll": "off",
1232 "blinking": "terminal_controlled",
1233 "copy_on_select": false,
1234 "env": {},
1235 "font_family": null,
1236 "font_features": null,
1237 "font_size": null,
1238 "option_as_meta": false,
1239 "button": false,
1240 "shell": {},
1241 "toolbar": {
1242 "title": true
1243 },
1244 "working_directory": "current_project_directory"
1245}
1246```
1247
1248### Alternate Scroll
1249
1250- 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.
1251- Setting: `alternate_scroll`
1252- Default: `off`
1253
1254**Options**
1255
12561. Default alternate scroll mode to on
1257
1258```json
1259{
1260 "alternate_scroll": "on"
1261}
1262```
1263
12642. Default alternate scroll mode to off
1265
1266```json
1267{
1268 "alternate_scroll": "off"
1269}
1270```
1271
1272### Blinking
1273
1274- Description: Set the cursor blinking behavior in the terminal
1275- Setting: `blinking`
1276- Default: `terminal_controlled`
1277
1278**Options**
1279
12801. Never blink the cursor, ignore the terminal mode
1281
1282```json
1283{
1284 "blinking": "off"
1285}
1286```
1287
12882. Default the cursor blink to off, but allow the terminal to turn blinking on
1289
1290```json
1291{
1292 "blinking": "terminal_controlled"
1293}
1294```
1295
12963. Always blink the cursor, ignore the terminal mode
1297
1298```json
1299"blinking": "on",
1300```
1301
1302### Copy On Select
1303
1304- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1305- Setting: `copy_on_select`
1306- Default: `false`
1307
1308**Options**
1309
1310`boolean` values
1311
1312### Env
1313
1314- 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
1315- Setting: `env`
1316- Default: `{}`
1317
1318**Example**
1319
1320```json
1321"env": {
1322 "ZED": "1",
1323 "KEY": "value1:value2"
1324}
1325```
1326
1327### Font Size
1328
1329- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1330- Setting: `font_size`
1331- Default: `null`
1332
1333**Options**
1334
1335`integer` values
1336
1337### Font Family
1338
1339- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1340- Setting: `font_family`
1341- Default: `null`
1342
1343**Options**
1344
1345The name of any font family installed on the user's system
1346
1347### Font Features
1348
1349- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1350- Setting: `font_features`
1351- Default: `null`
1352
1353**Options**
1354
1355See Buffer Font Features
1356
1357### Option As Meta
1358
1359- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1360- Setting: `option_as_meta`
1361- Default: `true`
1362
1363**Options**
1364
1365`boolean` values
1366
1367### Shell
1368
1369- Description: What shell to use when launching the terminal.
1370- Setting: `shell`
1371- Default: `system`
1372
1373**Options**
1374
13751. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1376
1377```json
1378{
1379 "shell": "system"
1380}
1381```
1382
13832. A program to launch:
1384
1385```json
1386"shell": {
1387 "program": "sh"
1388}
1389```
1390
13913. A program with arguments:
1392
1393```json
1394"shell": {
1395 "with_arguments": {
1396 "program": "/bin/bash",
1397 "args": ["--login"]
1398 }
1399}
1400```
1401
1402## Terminal Toolbar
1403
1404- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1405- Setting: `toolbar`
1406- Default:
1407
1408```json
1409"toolbar": {
1410 "title": true,
1411},
1412```
1413
1414**Options**
1415
1416At the moment, only the `title` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`. If the title is hidden, the terminal toolbar is not displayed.
1417
1418### Terminal Button
1419
1420- Description: Control to show or hide the terminal button in the status bar
1421- Setting: `button`
1422- Default: `true`
1423
1424**Options**
1425
1426`boolean` values
1427
1428### Working Directory
1429
1430- Description: What working directory to use when launching the terminal.
1431- Setting: `working_directory`
1432- Default: `"current_project_directory"`
1433
1434**Options**
1435
14361. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1437
1438```json
1439{
1440 "working_directory": "current_project_directory"
1441}
1442```
1443
14442. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1445
1446```json
1447{
1448 "working_directory": "first_project_directory"
1449}
1450```
1451
14523. Always use this platform's home directory (if we can find it)
1453
1454```json
1455{
1456 "working_directory": "always_home"
1457}
1458```
1459
14604. 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.
1461
1462```json
1463"working_directory": {
1464 "always": {
1465 "directory": "~/zed/projects/"
1466 }
1467}
1468```
1469
1470## Theme
1471
1472- 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.
1473- Setting: `theme`
1474- Default: `One Dark`
1475
1476### Theme Object
1477
1478- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1479- Setting: `theme`
1480- Default:
1481
1482```json
1483"theme": {
1484 "mode": "system",
1485 "dark": "One Dark",
1486 "light": "One Light"
1487},
1488```
1489
1490### Mode
1491
1492- Description: Specify theme mode.
1493- Setting: `mode`
1494- Default: `system`
1495
1496**Options**
1497
14981. Set the theme to dark mode
1499
1500```json
1501{
1502 "mode": "dark"
1503}
1504```
1505
15062. Set the theme to light mode
1507
1508```json
1509{
1510 "mode": "light"
1511}
1512```
1513
15143. Set the theme to system mode
1515
1516```json
1517{
1518 "mode": "system"
1519}
1520```
1521
1522### Dark
1523
1524- Description: The name of the dark Zed theme to use for the UI.
1525- Setting: `dark`
1526- Default: `One Dark`
1527
1528**Options**
1529
1530Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1531
1532### Light
1533
1534- Description: The name of the light Zed theme to use for the UI.
1535- Setting: `light`
1536- Default: `One Light`
1537
1538**Options**
1539
1540Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1541
1542## Vim
1543
1544- Description: Whether or not to enable vim mode (work in progress).
1545- Setting: `vim_mode`
1546- Default: `false`
1547
1548## Project Panel
1549
1550- Description: Customise project panel
1551- Setting: `project_panel`
1552- Default:
1553
1554```json
1555"project_panel": {
1556 "button": true,
1557 "dock": "left",
1558 "git_status": true,
1559 "default_width": "N/A - width in pixels"
1560},
1561```
1562
1563### Dock
1564
1565- Description: Control the position of the dock
1566- Setting: `dock`
1567- Default: `left`
1568
1569**Options**
1570
15711. Default dock position to left
1572
1573```json
1574{
1575 "dock": "left"
1576}
1577```
1578
15792. Default dock position to right
1580
1581```json
1582{
1583 "dock": "right"
1584}
1585```
1586
1587### Git Status
1588
1589- Description: Indicates newly created and updated files
1590- Setting: `git_status`
1591- Default: `true`
1592
15931. Default enable git status
1594
1595```json
1596{
1597 "git_status": true
1598}
1599```
1600
16012. Default disable git status
1602
1603```json
1604{
1605 "git_status": false
1606}
1607```
1608
1609### Default Width
1610
1611- Description: Customise default width taken by project panel
1612- Setting: `default_width`
1613- Default: N/A width in pixels (eg: 420)
1614
1615**Options**
1616
1617`boolean` values
1618
1619## Calls
1620
1621- Description: Customise behaviour when participating in a call
1622- Setting: `calls`
1623- Default:
1624
1625```json
1626"calls": {
1627 // Join calls with the microphone live by default
1628 "mute_on_join": false,
1629 // Share your project when you are the first to join a channel
1630 "share_on_join": false
1631},
1632```
1633
1634## An example configuration:
1635
1636```json
1637// ~/.config/zed/settings.json
1638{
1639 "theme": "cave-light",
1640 "tab_size": 2,
1641 "preferred_line_length": 80,
1642 "soft_wrap": "none",
1643
1644 "buffer_font_size": 18,
1645 "buffer_font_family": "Zed Plex Mono",
1646
1647 "autosave": "on_focus_change",
1648 "format_on_save": "off",
1649 "vim_mode": false,
1650 "projects_online_by_default": true,
1651 "terminal": {
1652 "font_family": "FiraCode Nerd Font Mono",
1653 "blinking": "off"
1654 },
1655 "languages": {
1656 "C": {
1657 "format_on_save": "language_server",
1658 "preferred_line_length": 64,
1659 "soft_wrap": "preferred_line_length"
1660 }
1661 }
1662}
1663```