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 `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.
17
18This 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`.
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 `zed: Open Default Settings` 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 Magnification
33
34- 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.
35- Setting: `active_pane_magnification`
36- Default: `1.0`
37
38**Options**
39
40`float` values
41
42## Autosave
43
44- Description: When to automatically save edited buffers.
45- Setting: `autosave`
46- Default: `off`
47
48**Options**
49
501. To disable autosave, set it to `off`:
51
52```json
53{
54 "autosave": "off"
55}
56```
57
582. To autosave when focus changes, use `on_focus_change`:
59
60```json
61{
62 "autosave": "on_focus_change"
63}
64```
65
663. To autosave when the active window changes, use `on_window_change`:
67
68```json
69{
70 "autosave": "on_window_change"
71}
72```
73
744. To autosave after an inactivity period, use `after_delay`:
75
76```json
77{
78 "autosave": {
79 "after_delay": {
80 "milliseconds": 1000
81 }
82 }
83}
84```
85
86## Auto Update
87
88- Description: Whether or not to automatically check for updates.
89- Setting: `auto_update`
90- Default: `true`
91
92**Options**
93
94`boolean` values
95
96## Buffer Font Family
97
98- Description: The name of a font to use for rendering text in the editor.
99- Setting: `buffer_font_family`
100- Default: `Zed Plex Mono`
101
102**Options**
103
104The name of any font family installed on the user's system
105
106## Buffer Font Features
107
108- Description: The OpenType features to enable for text in the editor.
109- Setting: `buffer_font_features`
110- Default: `null`
111
112**Options**
113
114Zed 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.
115
116For example, to disable font ligatures, add the following to your settings:
117
118```json
119{
120 "buffer_font_features": {
121 "calt": false
122 }
123}
124```
125
126You can also set other OpenType features, like setting `cv01` to `7`:
127
128```json
129{
130 "buffer_font_features": {
131 "cv01": 7
132 }
133}
134```
135
136## Buffer Font Size
137
138- Description: The default font size for text in the editor.
139- Setting: `buffer_font_size`
140- Default: `15`
141
142**Options**
143
144`integer` values
145
146## Buffer Font Weight
147
148- Description: The default font weight for text in the editor.
149- Setting: `buffer_font_weight`
150- Default: `400`
151
152**Options**
153
154`integer` values between `100` and `900`
155
156## Buffer Line Height
157
158- Description: The default line height for text in the editor.
159- Setting: `buffer_line_height`
160- Default: `"comfortable"`
161
162**Options**
163
164`"standard"`, `"comfortable"` or `{"custom": float}` (`1` is very compact, `2` very loose)
165
166## Confirm Quit
167
168- Description: Whether or not to prompt the user to confirm before closing the application.
169- Setting: `confirm_quit`
170- Default: `false`
171
172**Options**
173
174`boolean` values
175
176## Centered Layout
177
178- Description: Configuration for the centered layout mode.
179- Setting: `centered_layout`
180- Default:
181
182```json
183"centered_layout": {
184 "left_padding": 0.2,
185 "right_padding": 0.2,
186}
187```
188
189**Options**
190
191The `left_padding` and `right_padding` options define the relative width of the
192left 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`.
193
194## Direnv Integration
195
196- 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.
197- Setting: `load_direnv`
198- Default:
199
200```json
201"load_direnv": "shell_hook"
202```
203
204**Options**
205There are two options to choose from:
206
2071. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
2082. `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.
209
210## Inline Completions
211
212- Description: Settings for inline completions.
213- Setting: `inline_completions`
214- Default:
215
216```json
217"inline_completions": {
218 "disabled_globs": [
219 ".env"
220 ]
221}
222```
223
224**Options**
225
226### Disabled Globs
227
228- Description: A list of globs representing files that inline completions should be disabled for.
229- Setting: `disabled_globs`
230- Default: `[".env"]`
231
232**Options**
233
234List of `string` values
235
236## Current Line Highlight
237
238- Description: How to highlight the current line in the editor.
239- Setting: `current_line_highlight`
240- Default: `all`
241
242**Options**
243
2441. Don't highlight the current line:
245
246```json
247"current_line_highlight": "none"
248```
249
2502. Highlight the gutter area:
251
252```json
253"current_line_highlight": "gutter"
254```
255
2563. Highlight the editor area:
257
258```json
259"current_line_highlight": "line"
260```
261
2624. Highlight the full line:
263
264```json
265"current_line_highlight": "all"
266```
267
268## Cursor Blink
269
270- Description: Whether or not the cursor blinks.
271- Setting: `cursor_blink`
272- Default: `true`
273
274**Options**
275
276`boolean` values
277
278## Default Dock Anchor
279
280- Description: The default anchor for new docks.
281- Setting: `default_dock_anchor`
282- Default: `bottom`
283
284**Options**
285
2861. Position the dock attached to the bottom of the workspace: `bottom`
2872. Position the dock to the right of the workspace like a side panel: `right`
2883. Position the dock full screen over the entire workspace: `expanded`
289
290## Editor Scrollbar
291
292- Description: Whether or not to show the editor scrollbar and various elements in it.
293- Setting: `scrollbar`
294- Default:
295
296```json
297"scrollbar": {
298 "show": "auto",
299 "cursors": true,
300 "git_diff": true,
301 "search_results": true,
302 "selected_symbol": true,
303 "diagnostics": true
304},
305```
306
307### Show Mode
308
309- Description: When to show the editor scrollbar.
310- Setting: `show`
311- Default: `auto`
312
313**Options**
314
3151. Show the scrollbar if there's important information or follow the system's configured behavior:
316
317```json
318"scrollbar": {
319 "show": "auto"
320}
321```
322
3232. Match the system's configured behavior:
324
325```json
326"scrollbar": {
327 "show": "system"
328}
329```
330
3313. Always show the scrollbar:
332
333```json
334"scrollbar": {
335 "show": "always"
336}
337```
338
3394. Never show the scrollbar:
340
341```json
342"scrollbar": {
343 "show": "never"
344}
345```
346
347### Cursor Indicators
348
349- Description: Whether to show cursor positions in the scrollbar.
350- Setting: `cursors`
351- Default: `true`
352
353**Options**
354
355`boolean` values
356
357### Git Diff Indicators
358
359- Description: Whether to show git diff indicators in the scrollbar.
360- Setting: `git_diff`
361- Default: `true`
362
363**Options**
364
365`boolean` values
366
367### Search Results Indicators
368
369- Description: Whether to show buffer search results in the scrollbar.
370- Setting: `search_results`
371- Default: `true`
372
373**Options**
374
375`boolean` values
376
377### Selected Symbols Indicators
378
379- Description: Whether to show selected symbol occurrences in the scrollbar.
380- Setting: `selected_symbol`
381- Default: `true`
382
383**Options**
384
385`boolean` values
386
387### Diagnostics
388
389- Description: Whether to show diagnostic indicators in the scrollbar.
390- Setting: `diagnostics`
391- Default: `true`
392
393**Options**
394
395`boolean` values
396
397## Editor Tab Bar
398
399- Description: Settings related to the editor's tab bar.
400- Settings: `tab_bar`
401- Default:
402
403```json
404"tab_bar": {
405 "show": true,
406 "show_nav_history_buttons": true
407}
408```
409
410### Show
411
412- Description: Whether or not to show the tab bar in the editor.
413- Setting: `show`
414- Default: `true`
415
416**Options**
417
418`boolean` values
419
420### Navigation History Buttons
421
422- Description: Whether or not to show the navigation history buttons.
423- Setting: `show_nav_history_buttons`
424- Default: `true`
425
426**Options**
427
428`boolean` values
429
430## Editor Tabs
431
432- Description: Configuration for the editor tabs.
433- Setting: `tabs`
434- Default:
435
436```json
437"tabs": {
438 "close_position": "right",
439 "file_icons": false,
440 "git_status": false
441},
442```
443
444### Close Position
445
446- Description: Where to display close button within a tab.
447- Setting: `close_position`
448- Default: `right`
449
450**Options**
451
4521. Display the close button on the right:
453
454```json
455{
456 "close_position": "right"
457}
458```
459
4602. Display the close button on the left:
461
462```json
463{
464 "close_position": "left"
465}
466```
467
468### File Icons
469
470- Description: Whether to show the file icon for a tab.
471- Setting: `file_icons`
472- Default: `false`
473
474### Git Status
475
476- Description: Whether or not to show Git file status in tab.
477- Setting: `git_status`
478- Default: `false`
479
480## Editor Toolbar
481
482- Description: Whether or not to show various elements in the editor toolbar.
483- Setting: `toolbar`
484- Default:
485
486```json
487"toolbar": {
488 "breadcrumbs": true,
489 "quick_actions": true
490},
491```
492
493**Options**
494
495Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
496
497## Enable Language Server
498
499- Description: Whether or not to use language servers to provide code intelligence.
500- Setting: `enable_language_server`
501- Default: `true`
502
503**Options**
504
505`boolean` values
506
507## Ensure Final Newline On Save
508
509- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
510- Setting: `ensure_final_newline_on_save`
511- Default: `true`
512
513**Options**
514
515`boolean` values
516
517## LSP
518
519- Description: Configuration for language servers.
520- Setting: `lsp`
521- Default: `null`
522
523**Options**
524
525The following settings can be overridden for specific language servers:
526
527- `initialization_options`
528
529To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
530
531```json
532"lsp": {
533 "rust-analyzer": {
534 "initialization_options": {
535 "check": {
536 "command": "clippy" // rust-analyzer.check.command (default: "check")
537 }
538 }
539 }
540}
541```
542
543## Format On Save
544
545- Description: Whether or not to perform a buffer format before saving.
546- Setting: `format_on_save`
547- Default: `on`
548
549**Options**
550
5511. `on`, enables format on save obeying `formatter` setting:
552
553```json
554{
555 "format_on_save": "on"
556}
557```
558
5592. `off`, disables format on save:
560
561```json
562{
563 "format_on_save": "off"
564}
565```
566
567## Formatter
568
569- Description: How to perform a buffer format.
570- Setting: `formatter`
571- Default: `auto`
572
573**Options**
574
5751. To use the current language server, use `"language_server"`:
576
577```json
578{
579 "formatter": "language_server"
580}
581```
582
5832. 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):
584
585```json
586{
587 "formatter": {
588 "external": {
589 "command": "sed",
590 "arguments": ["-e", "s/ *$//"]
591 }
592 }
593}
594```
595
5963. Or to use code actions provided by the connected language servers, use `"code_actions"`:
597
598```json
599{
600 "formatter": {
601 "code_actions": {
602 // Use ESLint's --fix:
603 "source.fixAll.eslint": true,
604 // Organize imports on save:
605 "source.organizeImports": true
606 }
607 }
608}
609```
610
6114. Or to use multiple formatters consecutively, use an array of formatters:
612
613```json
614{
615 "formatter": [
616 {"language_server": {"name": "rust-analyzer"}},
617 {"external": {
618 "command": "sed",
619 "arguments": ["-e", "s/ *$//"]
620 }
621 ]
622}
623```
624
625Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
626If any of the formatters fails, the subsequent ones will still be executed.
627
628## Code Actions On Format
629
630- Description: The code actions to perform with the primary language server when formatting the buffer.
631- Setting: `code_actions_on_format`
632- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
633
634**Examples**
635
636<!--
637TBD: Add Python Ruff source.organizeImports example
638-->
639
6401. Organize imports on format in TypeScript and TSX buffers:
641
642```json
643{
644 "languages": {
645 "TypeScript": {
646 "code_actions_on_format": {
647 "source.organizeImports": true
648 }
649 },
650 "TSX": {
651 "code_actions_on_format": {
652 "source.organizeImports": true
653 }
654 }
655 }
656}
657```
658
6592. Run ESLint `fixAll` code action when formatting:
660
661```json
662{
663 "languages": {
664 "JavaScript": {
665 "code_actions_on_format": {
666 "source.fixAll.eslint": true
667 }
668 }
669 }
670}
671```
672
6733. Run only a single ESLint rule when using `fixAll`:
674
675```json
676{
677 "languages": {
678 "JavaScript": {
679 "code_actions_on_format": {
680 "source.fixAll.eslint": true
681 }
682 }
683 },
684 "lsp": {
685 "eslint": {
686 "settings": {
687 "codeActionOnSave": {
688 "rules": ["import/order"]
689 }
690 }
691 }
692 }
693}
694```
695
696## Auto close
697
698- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
699- Setting: `use_autoclose`
700- Default: `true`
701
702**Options**
703
704`boolean` values
705
706## Always Treat Brackets As Autoclosed
707
708- Description: Controls how the editor handles the autoclosed characters.
709- Setting: `always_treat_brackets_as_autoclosed`
710- Default: `false`
711
712**Options**
713
714`boolean` values
715
716**Example**
717
718If the setting is set to `true`:
719
7201. Enter in the editor: `)))`
7212. Move the cursor to the start: `^)))`
7223. Enter again: `)))`
723
724The result is still `)))` and not `))))))`, which is what it would be by default.
725
726## File Types
727
728- Setting: `file_types`
729- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
730- Default: `{}`
731
732**Examples**
733
734To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
735
736```json
737{
738 "file_types": {
739 "C++": ["c"],
740 "TOML": ["MyLockFile"],
741 "Dockerfile": ["Dockerfile*"]
742 }
743}
744```
745
746## Git
747
748- Description: Configuration for git-related features.
749- Setting: `git`
750- Default:
751
752```json
753{
754 "git": {
755 "git_gutter": "tracked_files",
756 "inline_blame": {
757 "enabled": true
758 }
759 }
760}
761```
762
763### Git Gutter
764
765- Description: Whether or not to show the git gutter.
766- Setting: `git_gutter`
767- Default: `tracked_files`
768
769**Options**
770
7711. Show git gutter in tracked files
772
773```json
774{
775 "git": {
776 "git_gutter": "tracked_files"
777 }
778}
779```
780
7812. Hide git gutter
782
783```json
784{
785 "git": {
786 "git_gutter": "hide"
787 }
788}
789```
790
791### Indent Guides
792
793- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
794- Setting: `indent_guides`
795- Default:
796
797```json
798{
799 "indent_guides": {
800 "enabled": true,
801 "line_width": 1,
802 "active_line_width": 1,
803 "coloring": "fixed",
804 "background_coloring": "disabled"
805 }
806}
807```
808
809**Options**
810
8111. Disable indent guides
812
813```json
814{
815 "indent_guides": {
816 "enabled": false
817 }
818}
819```
820
8212. Enable indent guides for a specific language.
822
823```json
824{
825 "languages": {
826 "Python": {
827 "indent_guides": {
828 "enabled": true
829 }
830 }
831 }
832}
833```
834
8353. Enable indent aware coloring ("rainbow indentation").
836 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.
837
838```json
839{
840 "indent_guides": {
841 "enabled": true,
842 "coloring": "indent_aware"
843 }
844}
845```
846
8474. Enable indent aware background coloring ("rainbow indentation").
848 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.
849
850```json
851{
852 "indent_guides": {
853 "enabled": true,
854 "coloring": "indent_aware",
855 "background_coloring": "indent_aware"
856 }
857}
858```
859
860### Inline Git Blame
861
862- Description: Whether or not to show git blame information inline, on the currently focused line.
863- Setting: `inline_blame`
864- Default:
865
866```json
867{
868 "git": {
869 "inline_blame": {
870 "enabled": true
871 }
872 }
873}
874```
875
876**Options**
877
8781. Disable inline git blame:
879
880```json
881{
882 "git": {
883 "inline_blame": {
884 "enabled": false
885 }
886 }
887}
888```
889
8902. Only show inline git blame after a delay (that starts after cursor stops moving):
891
892```json
893{
894 "git": {
895 "inline_blame": {
896 "enabled": false,
897 "delay_ms": 500
898 }
899 }
900}
901```
902
903## Hard Tabs
904
905- Description: Whether to indent lines using tab characters or multiple spaces.
906- Setting: `hard_tabs`
907- Default: `false`
908
909**Options**
910
911`boolean` values
912
913## Hover Popover Enabled
914
915- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
916- Setting: `hover_popover_enabled`
917- Default: `true`
918
919**Options**
920
921`boolean` values
922
923## Inlay hints
924
925- Description: Configuration for displaying extra text with hints in the editor.
926- Setting: `inlay_hints`
927- Default:
928
929```json
930"inlay_hints": {
931 "enabled": false,
932 "show_type_hints": true,
933 "show_parameter_hints": true,
934 "show_other_hints": true,
935 "edit_debounce_ms": 700,
936 "scroll_debounce_ms": 50
937}
938```
939
940**Options**
941
942Inlay hints querying consists of two parts: editor (client) and LSP server.
943With 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.
944At 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.
945
946The following languages have inlay hints preconfigured by Zed:
947
948- [Go](https://docs.zed.dev/languages/go)
949- [Rust](https://docs.zed.dev/languages/rust)
950- [Svelte](https://docs.zed.dev/languages/svelte)
951- [Typescript](https://docs.zed.dev/languages/typescript)
952
953Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
954
955Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
956Settings-related hint updates are not debounced.
957
958## Journal
959
960- Description: Configuration for the journal.
961- Setting: `journal`
962- Default:
963
964```json
965"journal": {
966 "path": "~",
967 "hour_format": "hour12"
968}
969```
970
971### Path
972
973- Description: The path of the directory where journal entries are stored.
974- Setting: `path`
975- Default: `~`
976
977**Options**
978
979`string` values
980
981### Hour Format
982
983- Description: The format to use for displaying hours in the journal.
984- Setting: `hour_format`
985- Default: `hour12`
986
987**Options**
988
9891. 12-hour format:
990
991```json
992{
993 "hour_format": "hour12"
994}
995```
996
9972. 24-hour format:
998
999```json
1000{
1001 "hour_format": "hour24"
1002}
1003```
1004
1005## Languages
1006
1007- Description: Configuration for specific languages.
1008- Setting: `languages`
1009- Default: `null`
1010
1011**Options**
1012
1013To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1014
1015```json
1016"languages": {
1017 "C": {
1018 "format_on_save": "off",
1019 "preferred_line_length": 64,
1020 "soft_wrap": "preferred_line_length"
1021 },
1022 "JSON": {
1023 "tab_size": 4
1024 }
1025}
1026```
1027
1028The following settings can be overridden for each specific language:
1029
1030- `enable_language_server`
1031- `ensure_final_newline_on_save`
1032- `format_on_save`
1033- `formatter`
1034- `hard_tabs`
1035- `preferred_line_length`
1036- `remove_trailing_whitespace_on_save`
1037- `show_inline_completions`
1038- `show_whitespaces`
1039- `soft_wrap`
1040- `tab_size`
1041- `use_autoclose`
1042- `always_treat_brackets_as_autoclosed`
1043
1044These values take in the same options as the root-level settings with the same name.
1045
1046## Preview tabs
1047
1048- Description:
1049 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. \
1050 There are several ways to convert a preview tab into a regular tab:
1051
1052 - Double-clicking on the file
1053 - Double-clicking on the tab header
1054 - Using the `project_panel::OpenPermanent` action
1055 - Editing the file
1056 - Dragging the file to a different pane
1057
1058- Setting: `preview_tabs`
1059- Default:
1060
1061```json
1062"preview_tabs": {
1063 "enabled": true,
1064 "enable_preview_from_file_finder": false,
1065 "enable_preview_from_code_navigation": false,
1066}
1067```
1068
1069### Enable preview from file finder
1070
1071- Description: Determines whether to open files in preview mode when selected from the file finder.
1072- Setting: `enable_preview_from_file_finder`
1073- Default: `false`
1074
1075**Options**
1076
1077`boolean` values
1078
1079### Enable preview from code navigation
1080
1081- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1082- Setting: `enable_preview_from_code_navigation`
1083- Default: `false`
1084
1085**Options**
1086
1087`boolean` values
1088
1089## Preferred Line Length
1090
1091- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1092- Setting: `preferred_line_length`
1093- Default: `80`
1094
1095**Options**
1096
1097`integer` values
1098
1099## Projects Online By Default
1100
1101- Description: Whether or not to show the online projects view by default.
1102- Setting: `projects_online_by_default`
1103- Default: `true`
1104
1105**Options**
1106
1107`boolean` values
1108
1109## Remove Trailing Whitespace On Save
1110
1111- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1112- Setting: `remove_trailing_whitespace_on_save`
1113- Default: `true`
1114
1115**Options**
1116
1117`boolean` values
1118
1119## Show Call Status Icon
1120
1121- Description: Whether or not to show the call status icon in the status bar.
1122- Setting: `show_call_status_icon`
1123- Default: `true`
1124
1125**Options**
1126
1127`boolean` values
1128
1129## Show Completions On Input
1130
1131- Description: Whether or not to show completions as you type.
1132- Setting: `show_completions_on_input`
1133- Default: `true`
1134
1135**Options**
1136
1137`boolean` values
1138
1139## Show Completion Documentation
1140
1141- Description: Whether to display inline and alongside documentation for items in the completions menu.
1142- Setting: `show_completion_documentation`
1143- Default: `true`
1144
1145**Options**
1146
1147`boolean` values
1148
1149## Completion Documentation Debounce Delay
1150
1151- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1152- Setting: `completion_documentation_secondary_query_debounce`
1153- Default: `300` ms
1154
1155**Options**
1156
1157`integer` values
1158
1159## Show Inline Completions
1160
1161- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1162- Setting: `show_inline_completions`
1163- Default: `true`
1164
1165**Options**
1166
1167`boolean` values
1168
1169## Show Whitespaces
1170
1171- Description: Whether or not to show render whitespace characters in the editor.
1172- Setting: `show_whitespaces`
1173- Default: `selection`
1174
1175**Options**
1176
11771. `all`
11782. `selection`
11793. `none`
11804. `boundary`
1181
1182## Soft Wrap
1183
1184- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1185- Setting: `soft_wrap`
1186- Default: `prefer_line`
1187
1188**Options**
1189
11901. `none` to stop the soft-wrapping
11912. `prefer_line` to avoid wrapping generally, unless the line is too long
11923. `editor_width` to wrap lines that overflow the editor width
11934. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
1194
1195## Wrap Guides (Vertical Rulers)
1196
1197- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1198- Setting: `wrap_guides`
1199- Default: []
1200
1201**Options**
1202
1203List of `integer` column numbers
1204
1205## Tab Size
1206
1207- Description: The number of spaces to use for each tab character.
1208- Setting: `tab_size`
1209- Default: `4`
1210
1211**Options**
1212
1213`integer` values
1214
1215## Telemetry
1216
1217- Description: Control what info is collected by Zed.
1218- Setting: `telemetry`
1219- Default:
1220
1221```json
1222"telemetry": {
1223 "diagnostics": true,
1224 "metrics": true
1225},
1226```
1227
1228**Options**
1229
1230### Diagnostics
1231
1232- Description: Setting for sending debug-related data, such as crash reports.
1233- Setting: `diagnostics`
1234- Default: `true`
1235
1236**Options**
1237
1238`boolean` values
1239
1240### Metrics
1241
1242- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1243- Setting: `metrics`
1244- Default: `true`
1245
1246**Options**
1247
1248`boolean` values
1249
1250## Terminal
1251
1252- Description: Configuration for the terminal.
1253- Setting: `terminal`
1254- Default:
1255
1256```json
1257{
1258 "terminal": {
1259 "alternate_scroll": "off",
1260 "blinking": "terminal_controlled",
1261 "copy_on_select": false,
1262 "dock": "bottom",
1263 "env": {},
1264 "font_family": null,
1265 "font_features": null,
1266 "font_size": null,
1267 "option_as_meta": true,
1268 "button": false,
1269 "shell": {},
1270 "toolbar": {
1271 "title": true
1272 },
1273 "working_directory": "current_project_directory"
1274 }
1275}
1276```
1277
1278### Terminal: Dock
1279
1280- Description: Control the position of the dock
1281- Setting: `dock`
1282- Default: `bottom`
1283
1284**Options**
1285
1286`"bottom"`, `"left"` or `"right"`
1287
1288### Terminal: Alternate Scroll
1289
1290- 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.
1291- Setting: `alternate_scroll`
1292- Default: `off`
1293
1294**Options**
1295
12961. Default alternate scroll mode to on
1297
1298```json
1299{
1300 "terminal": {
1301 "alternate_scroll": "on"
1302 }
1303}
1304```
1305
13062. Default alternate scroll mode to off
1307
1308```json
1309{
1310 "terminal": {
1311 "alternate_scroll": "off"
1312 }
1313}
1314```
1315
1316### Terminal: Blinking
1317
1318- Description: Set the cursor blinking behavior in the terminal
1319- Setting: `blinking`
1320- Default: `terminal_controlled`
1321
1322**Options**
1323
13241. Never blink the cursor, ignore the terminal mode
1325
1326```json
1327{
1328 "terminal": {
1329 "blinking": "off"
1330 }
1331}
1332```
1333
13342. Default the cursor blink to off, but allow the terminal to turn blinking on
1335
1336```json
1337{
1338 "terminal": {
1339 "blinking": "terminal_controlled"
1340 }
1341}
1342```
1343
13443. Always blink the cursor, ignore the terminal mode
1345
1346```json
1347{
1348 "terminal": {
1349 "blinking": "on"
1350 }
1351}
1352```
1353
1354### Terminal: Copy On Select
1355
1356- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1357- Setting: `copy_on_select`
1358- Default: `false`
1359
1360**Options**
1361
1362`boolean` values
1363
1364**Example**
1365
1366```json
1367{
1368 "terminal": {
1369 "copy_on_select": true
1370 }
1371}
1372```
1373
1374### Terminal: Env
1375
1376- 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
1377- Setting: `env`
1378- Default: `{}`
1379
1380**Example**
1381
1382```json
1383{
1384 "terminal": {
1385 "env": {
1386 "ZED": "1",
1387 "KEY": "value1:value2"
1388 }
1389 }
1390}
1391```
1392
1393### Terminal: Font Size
1394
1395- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1396- Setting: `font_size`
1397- Default: `null`
1398
1399**Options**
1400
1401`integer` values
1402
1403```json
1404{
1405 "terminal": {
1406 "font_size": 15
1407 }
1408}
1409```
1410
1411### Terminal: Font Family
1412
1413- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1414- Setting: `font_family`
1415- Default: `null`
1416
1417**Options**
1418
1419The name of any font family installed on the user's system
1420
1421```json
1422{
1423 "terminal": {
1424 "font_family": "Berkeley Mono"
1425 }
1426}
1427```
1428
1429### Terminal: Font Features
1430
1431- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1432- Setting: `font_features`
1433- Default: `null`
1434
1435**Options**
1436
1437See Buffer Font Features
1438
1439```jsonc
1440{
1441 "terminal": {
1442 "font_features": {
1443 "calt": false,
1444 // See Buffer Font Features for more features
1445 },
1446 },
1447}
1448```
1449
1450### Terminal: Option As Meta
1451
1452- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1453- Setting: `option_as_meta`
1454- Default: `true`
1455
1456**Options**
1457
1458`boolean` values
1459
1460```json
1461{
1462 "terminal": {
1463 "option_as_meta": true
1464 }
1465}
1466```
1467
1468### Terminal: Shell
1469
1470- Description: What shell to use when launching the terminal.
1471- Setting: `shell`
1472- Default: `system`
1473
1474**Options**
1475
14761. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1477
1478```json
1479{
1480 "terminal": {
1481 "shell": "system"
1482 }
1483}
1484```
1485
14862. A program to launch:
1487
1488```json
1489{
1490 "terminal": {
1491 "shell": {
1492 "program": "sh"
1493 }
1494 }
1495}
1496```
1497
14983. A program with arguments:
1499
1500```json
1501{
1502 "terminal": {
1503 "shell": {
1504 "with_arguments": {
1505 "program": "/bin/bash",
1506 "args": ["--login"]
1507 }
1508 }
1509 }
1510}
1511```
1512
1513## Terminal: Toolbar
1514
1515- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1516- Setting: `toolbar`
1517- Default:
1518
1519```json
1520{
1521 "terminal": {
1522 "toolbar": {
1523 "title": true
1524 }
1525 }
1526}
1527```
1528
1529**Options**
1530
1531At 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.
1532
1533### Terminal: Button
1534
1535- Description: Control to show or hide the terminal button in the status bar
1536- Setting: `button`
1537- Default: `true`
1538
1539**Options**
1540
1541`boolean` values
1542
1543```json
1544{
1545 "terminal": {
1546 "button": false
1547 }
1548}
1549```
1550
1551### Terminal: Working Directory
1552
1553- Description: What working directory to use when launching the terminal.
1554- Setting: `working_directory`
1555- Default: `"current_project_directory"`
1556
1557**Options**
1558
15591. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1560
1561```json
1562{
1563 "terminal": {
1564 "working_directory": "current_project_directory"
1565 }
1566}
1567```
1568
15692. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1570
1571```json
1572{
1573 "terminal": {
1574 "working_directory": "first_project_directory"
1575 }
1576}
1577```
1578
15793. Always use this platform's home directory (if we can find it)
1580
1581```json
1582{
1583 "terminal": {
1584 "working_directory": "always_home"
1585 }
1586}
1587```
1588
15894. 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.
1590
1591```json
1592{
1593 "terminal": {
1594 "working_directory": {
1595 "always": {
1596 "directory": "~/zed/projects/"
1597 }
1598 }
1599 }
1600}
1601```
1602
1603## Theme
1604
1605- 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.
1606- Setting: `theme`
1607- Default: `One Dark`
1608
1609### Theme Object
1610
1611- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1612- Setting: `theme`
1613- Default:
1614
1615```json
1616"theme": {
1617 "mode": "system",
1618 "dark": "One Dark",
1619 "light": "One Light"
1620},
1621```
1622
1623### Mode
1624
1625- Description: Specify theme mode.
1626- Setting: `mode`
1627- Default: `system`
1628
1629**Options**
1630
16311. Set the theme to dark mode
1632
1633```json
1634{
1635 "mode": "dark"
1636}
1637```
1638
16392. Set the theme to light mode
1640
1641```json
1642{
1643 "mode": "light"
1644}
1645```
1646
16473. Set the theme to system mode
1648
1649```json
1650{
1651 "mode": "system"
1652}
1653```
1654
1655### Dark
1656
1657- Description: The name of the dark Zed theme to use for the UI.
1658- Setting: `dark`
1659- Default: `One Dark`
1660
1661**Options**
1662
1663Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1664
1665### Light
1666
1667- Description: The name of the light Zed theme to use for the UI.
1668- Setting: `light`
1669- Default: `One Light`
1670
1671**Options**
1672
1673Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1674
1675## Vim
1676
1677- Description: Whether or not to enable vim mode (work in progress).
1678- Setting: `vim_mode`
1679- Default: `false`
1680
1681## Project Panel
1682
1683- Description: Customize project panel
1684- Setting: `project_panel`
1685- Default:
1686
1687```json
1688{
1689 "project_panel": {
1690 "button": true,
1691 "default_width": 240,
1692 "dock": "left",
1693 "file_icons": true,
1694 "folder_icons": true,
1695 "git_status": true,
1696 "indent_size": 20,
1697 "auto_reveal_entries": true,
1698 "auto_fold_dirs": true,
1699 "scrollbar": {
1700 "show": "always"
1701 }
1702 }
1703}
1704```
1705
1706### Dock
1707
1708- Description: Control the position of the dock
1709- Setting: `dock`
1710- Default: `left`
1711
1712**Options**
1713
17141. Default dock position to left
1715
1716```json
1717{
1718 "dock": "left"
1719}
1720```
1721
17222. Default dock position to right
1723
1724```json
1725{
1726 "dock": "right"
1727}
1728```
1729
1730### Git Status
1731
1732- Description: Indicates newly created and updated files
1733- Setting: `git_status`
1734- Default: `true`
1735
1736**Options**
1737
17381. Default enable git status
1739
1740```json
1741{
1742 "git_status": true
1743}
1744```
1745
17462. Default disable git status
1747
1748```json
1749{
1750 "git_status": false
1751}
1752```
1753
1754### Default Width
1755
1756- Description: Customize default width taken by project panel
1757- Setting: `default_width`
1758- Default: N/A width in pixels (eg: 420)
1759
1760**Options**
1761
1762`boolean` values
1763
1764### Auto Reveal Entries
1765
1766- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
1767- Setting: `auto_reveal_entries`
1768- Default: `true`
1769
1770**Options**
1771
17721. Enable auto reveal entries
1773
1774```json
1775{
1776 "auto_reveal_entries": true
1777}
1778```
1779
17802. Disable auto reveal entries
1781
1782```json
1783{
1784 "auto_reveal_entries": false
1785}
1786```
1787
1788### Auto Fold Dirs
1789
1790- Description: Whether to fold directories automatically when directory has only one directory inside.
1791- Setting: `auto_fold_dirs`
1792- Default: `false`
1793
1794**Options**
1795
17961. Enable auto fold dirs
1797
1798```json
1799{
1800 "auto_fold_dirs": true
1801}
1802```
1803
18042. Disable auto fold dirs
1805
1806```json
1807{
1808 "auto_fold_dirs": false
1809}
1810```
1811
1812### Indent Size
1813
1814- Description: Amount of indentation (in pixels) for nested items.
1815- Setting: `indent_size`
1816- Default: `20`
1817
1818### Scrollbar
1819
1820- Description: Scrollbar related settings. Possible values: "always", "never".
1821- Setting: `scrollbar`
1822- Default:
1823
1824```json
1825"scrollbar": {
1826 "show": "always"
1827}
1828```
1829
1830**Options**
1831
18321. Show scrollbar in project panel
1833
1834```json
1835{
1836 "scrollbar": {
1837 "show": "always"
1838 }
1839}
1840```
1841
18422. Hide scrollbar in project panel
1843
1844```json
1845{
1846 "scrollbar": {
1847 "show": "never"
1848 }
1849}
1850```
1851
1852## Assistant Panel
1853
1854- Description: Customize assistant panel
1855- Setting: `assistant`
1856- Default:
1857
1858```json
1859"assistant": {
1860 "enabled": true,
1861 "button": true,
1862 "dock": "right",
1863 "default_width": 640,
1864 "default_height": 320,
1865 "provider": "openai",
1866 "version": "1",
1867},
1868```
1869
1870## Outline Panel
1871
1872- Description: Customize outline Panel
1873- Setting: `outline_panel`
1874- Default:
1875
1876```json
1877"outline_panel": {
1878 "button": true,
1879 "default_width": 240,
1880 "dock": "left",
1881 "file_icons": true,
1882 "folder_icons": true,
1883 "git_status": true,
1884 "indent_size": 20,
1885 "auto_reveal_entries": true,
1886 "auto_fold_dirs": true,
1887}
1888```
1889
1890## Calls
1891
1892- Description: Customize behavior when participating in a call
1893- Setting: `calls`
1894- Default:
1895
1896```json
1897"calls": {
1898 // Join calls with the microphone live by default
1899 "mute_on_join": false,
1900 // Share your project when you are the first to join a channel
1901 "share_on_join": false
1902},
1903```
1904
1905## An example configuration:
1906
1907```json
1908// ~/.config/zed/settings.json
1909{
1910 "theme": "cave-light",
1911 "tab_size": 2,
1912 "preferred_line_length": 80,
1913 "soft_wrap": "none",
1914
1915 "buffer_font_size": 18,
1916 "buffer_font_family": "Zed Plex Mono",
1917
1918 "autosave": "on_focus_change",
1919 "format_on_save": "off",
1920 "vim_mode": false,
1921 "projects_online_by_default": true,
1922 "terminal": {
1923 "font_family": "FiraCode Nerd Font Mono",
1924 "blinking": "off"
1925 },
1926 "languages": {
1927 "C": {
1928 "format_on_save": "language_server",
1929 "preferred_line_length": 64,
1930 "soft_wrap": "preferred_line_length"
1931 }
1932 }
1933}
1934```