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 "env": {},
1263 "font_family": null,
1264 "font_features": null,
1265 "font_size": null,
1266 "option_as_meta": true,
1267 "button": false,
1268 "shell": {},
1269 "toolbar": {
1270 "title": true
1271 },
1272 "working_directory": "current_project_directory"
1273 }
1274}
1275```
1276
1277### Terminal: Alternate Scroll
1278
1279- 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.
1280- Setting: `alternate_scroll`
1281- Default: `off`
1282
1283**Options**
1284
12851. Default alternate scroll mode to on
1286
1287```json
1288{
1289 "terminal": {
1290 "alternate_scroll": "on"
1291 }
1292}
1293```
1294
12952. Default alternate scroll mode to off
1296
1297```json
1298{
1299 "terminal": {
1300 "alternate_scroll": "off"
1301 }
1302}
1303```
1304
1305### Terminal: Blinking
1306
1307- Description: Set the cursor blinking behavior in the terminal
1308- Setting: `blinking`
1309- Default: `terminal_controlled`
1310
1311**Options**
1312
13131. Never blink the cursor, ignore the terminal mode
1314
1315```json
1316{
1317 "terminal": {
1318 "blinking": "off"
1319 }
1320}
1321```
1322
13232. Default the cursor blink to off, but allow the terminal to turn blinking on
1324
1325```json
1326{
1327 "terminal": {
1328 "blinking": "terminal_controlled"
1329 }
1330}
1331```
1332
13333. Always blink the cursor, ignore the terminal mode
1334
1335```json
1336{
1337 "terminal": {
1338 "blinking": "on"
1339 }
1340}
1341```
1342
1343### Terminal: Copy On Select
1344
1345- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1346- Setting: `copy_on_select`
1347- Default: `false`
1348
1349**Options**
1350
1351`boolean` values
1352
1353**Example**
1354
1355```json
1356{
1357 "terminal": {
1358 "copy_on_select": true
1359 }
1360}
1361```
1362
1363### Terminal: Env
1364
1365- 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
1366- Setting: `env`
1367- Default: `{}`
1368
1369**Example**
1370
1371```json
1372{
1373 "terminal": {
1374 "env": {
1375 "ZED": "1",
1376 "KEY": "value1:value2"
1377 }
1378 }
1379}
1380```
1381
1382### Terminal: Font Size
1383
1384- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1385- Setting: `font_size`
1386- Default: `null`
1387
1388**Options**
1389
1390`integer` values
1391
1392```json
1393{
1394 "terminal": {
1395 "font_size": 15
1396 }
1397}
1398```
1399
1400### Terminal: Font Family
1401
1402- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1403- Setting: `font_family`
1404- Default: `null`
1405
1406**Options**
1407
1408The name of any font family installed on the user's system
1409
1410```json
1411{
1412 "terminal": {
1413 "font_family": "Berkeley Mono"
1414 }
1415}
1416```
1417
1418### Terminal: Font Features
1419
1420- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1421- Setting: `font_features`
1422- Default: `null`
1423
1424**Options**
1425
1426See Buffer Font Features
1427
1428```jsonc
1429{
1430 "terminal": {
1431 "font_features": {
1432 "calt": false,
1433 // See Buffer Font Features for more features
1434 },
1435 },
1436}
1437```
1438
1439### Terminal: Option As Meta
1440
1441- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1442- Setting: `option_as_meta`
1443- Default: `true`
1444
1445**Options**
1446
1447`boolean` values
1448
1449```json
1450{
1451 "terminal": {
1452 "option_as_meta": true
1453 }
1454}
1455```
1456
1457### Terminal: Shell
1458
1459- Description: What shell to use when launching the terminal.
1460- Setting: `shell`
1461- Default: `system`
1462
1463**Options**
1464
14651. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1466
1467```json
1468{
1469 "terminal": {
1470 "shell": "system"
1471 }
1472}
1473```
1474
14752. A program to launch:
1476
1477```json
1478{
1479 "terminal": {
1480 "shell": {
1481 "program": "sh"
1482 }
1483 }
1484}
1485```
1486
14873. A program with arguments:
1488
1489```json
1490{
1491 "terminal": {
1492 "shell": {
1493 "with_arguments": {
1494 "program": "/bin/bash",
1495 "args": ["--login"]
1496 }
1497 }
1498 }
1499}
1500```
1501
1502## Terminal: Toolbar
1503
1504- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1505- Setting: `toolbar`
1506- Default:
1507
1508```json
1509{
1510 "terminal": {
1511 "toolbar": {
1512 "title": true
1513 }
1514 }
1515}
1516```
1517
1518**Options**
1519
1520At 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.
1521
1522### Terminal: Button
1523
1524- Description: Control to show or hide the terminal button in the status bar
1525- Setting: `button`
1526- Default: `true`
1527
1528**Options**
1529
1530`boolean` values
1531
1532```json
1533{
1534 "terminal": {
1535 "button": false
1536 }
1537}
1538```
1539
1540### Terminal: Working Directory
1541
1542- Description: What working directory to use when launching the terminal.
1543- Setting: `working_directory`
1544- Default: `"current_project_directory"`
1545
1546**Options**
1547
15481. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1549
1550```json
1551{
1552 "terminal": {
1553 "working_directory": "current_project_directory"
1554 }
1555}
1556```
1557
15582. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1559
1560```json
1561{
1562 "terminal": {
1563 "working_directory": "first_project_directory"
1564 }
1565}
1566```
1567
15683. Always use this platform's home directory (if we can find it)
1569
1570```json
1571{
1572 "terminal": {
1573 "working_directory": "always_home"
1574 }
1575}
1576```
1577
15784. 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.
1579
1580```json
1581{
1582 "terminal": {
1583 "working_directory": {
1584 "always": {
1585 "directory": "~/zed/projects/"
1586 }
1587 }
1588 }
1589}
1590```
1591
1592## Theme
1593
1594- 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.
1595- Setting: `theme`
1596- Default: `One Dark`
1597
1598### Theme Object
1599
1600- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1601- Setting: `theme`
1602- Default:
1603
1604```json
1605"theme": {
1606 "mode": "system",
1607 "dark": "One Dark",
1608 "light": "One Light"
1609},
1610```
1611
1612### Mode
1613
1614- Description: Specify theme mode.
1615- Setting: `mode`
1616- Default: `system`
1617
1618**Options**
1619
16201. Set the theme to dark mode
1621
1622```json
1623{
1624 "mode": "dark"
1625}
1626```
1627
16282. Set the theme to light mode
1629
1630```json
1631{
1632 "mode": "light"
1633}
1634```
1635
16363. Set the theme to system mode
1637
1638```json
1639{
1640 "mode": "system"
1641}
1642```
1643
1644### Dark
1645
1646- Description: The name of the dark Zed theme to use for the UI.
1647- Setting: `dark`
1648- Default: `One Dark`
1649
1650**Options**
1651
1652Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1653
1654### Light
1655
1656- Description: The name of the light Zed theme to use for the UI.
1657- Setting: `light`
1658- Default: `One Light`
1659
1660**Options**
1661
1662Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1663
1664## Vim
1665
1666- Description: Whether or not to enable vim mode (work in progress).
1667- Setting: `vim_mode`
1668- Default: `false`
1669
1670## Project Panel
1671
1672- Description: Customize project panel
1673- Setting: `project_panel`
1674- Default:
1675
1676```json
1677{
1678 "project_panel": {
1679 "button": true,
1680 "default_width": 240,
1681 "dock": "left",
1682 "file_icons": true,
1683 "folder_icons": true,
1684 "git_status": true,
1685 "indent_size": 20,
1686 "auto_reveal_entries": true,
1687 "auto_fold_dirs": true,
1688 "scrollbar": {
1689 "show": "always"
1690 }
1691 }
1692}
1693```
1694
1695### Dock
1696
1697- Description: Control the position of the dock
1698- Setting: `dock`
1699- Default: `left`
1700
1701**Options**
1702
17031. Default dock position to left
1704
1705```json
1706{
1707 "dock": "left"
1708}
1709```
1710
17112. Default dock position to right
1712
1713```json
1714{
1715 "dock": "right"
1716}
1717```
1718
1719### Git Status
1720
1721- Description: Indicates newly created and updated files
1722- Setting: `git_status`
1723- Default: `true`
1724
1725**Options**
1726
17271. Default enable git status
1728
1729```json
1730{
1731 "git_status": true
1732}
1733```
1734
17352. Default disable git status
1736
1737```json
1738{
1739 "git_status": false
1740}
1741```
1742
1743### Default Width
1744
1745- Description: Customize default width taken by project panel
1746- Setting: `default_width`
1747- Default: N/A width in pixels (eg: 420)
1748
1749**Options**
1750
1751`boolean` values
1752
1753### Auto Reveal Entries
1754
1755- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
1756- Setting: `auto_reveal_entries`
1757- Default: `true`
1758
1759**Options**
1760
17611. Enable auto reveal entries
1762
1763```json
1764{
1765 "auto_reveal_entries": true
1766}
1767```
1768
17692. Disable auto reveal entries
1770
1771```json
1772{
1773 "auto_reveal_entries": false
1774}
1775```
1776
1777### Auto Fold Dirs
1778
1779- Description: Whether to fold directories automatically when directory has only one directory inside.
1780- Setting: `auto_fold_dirs`
1781- Default: `false`
1782
1783**Options**
1784
17851. Enable auto fold dirs
1786
1787```json
1788{
1789 "auto_fold_dirs": true
1790}
1791```
1792
17932. Disable auto fold dirs
1794
1795```json
1796{
1797 "auto_fold_dirs": false
1798}
1799```
1800
1801### Indent Size
1802
1803- Description: Amount of indentation (in pixels) for nested items.
1804- Setting: `indent_size`
1805- Default: `20`
1806
1807### Scrollbar
1808
1809- Description: Scrollbar related settings. Possible values: "always", "never".
1810- Setting: `scrollbar`
1811- Default:
1812
1813```json
1814"scrollbar": {
1815 "show": "always"
1816}
1817```
1818
1819**Options**
1820
18211. Show scrollbar in project panel
1822
1823```json
1824{
1825 "scrollbar": {
1826 "show": "always"
1827 }
1828}
1829```
1830
18312. Hide scrollbar in project panel
1832
1833```json
1834{
1835 "scrollbar": {
1836 "show": "never"
1837 }
1838}
1839```
1840
1841## Assistant Panel
1842
1843- Description: Customize assistant panel
1844- Setting: `assistant`
1845- Default:
1846
1847```json
1848"assistant": {
1849 "enabled": true,
1850 "button": true,
1851 "dock": "right",
1852 "default_width": 640,
1853 "default_height": 320,
1854 "provider": "openai",
1855 "version": "1",
1856},
1857```
1858
1859## Outline Panel
1860
1861- Description: Customize outline Panel
1862- Setting: `outline_panel`
1863- Default:
1864
1865```json
1866"outline_panel": {
1867 "button": true,
1868 "default_width": 240,
1869 "dock": "left",
1870 "file_icons": true,
1871 "folder_icons": true,
1872 "git_status": true,
1873 "indent_size": 20,
1874 "auto_reveal_entries": true,
1875 "auto_fold_dirs": true,
1876}
1877```
1878
1879## Calls
1880
1881- Description: Customize behavior when participating in a call
1882- Setting: `calls`
1883- Default:
1884
1885```json
1886"calls": {
1887 // Join calls with the microphone live by default
1888 "mute_on_join": false,
1889 // Share your project when you are the first to join a channel
1890 "share_on_join": false
1891},
1892```
1893
1894## An example configuration:
1895
1896```json
1897// ~/.config/zed/settings.json
1898{
1899 "theme": "cave-light",
1900 "tab_size": 2,
1901 "preferred_line_length": 80,
1902 "soft_wrap": "none",
1903
1904 "buffer_font_size": 18,
1905 "buffer_font_family": "Zed Plex Mono",
1906
1907 "autosave": "on_focus_change",
1908 "format_on_save": "off",
1909 "vim_mode": false,
1910 "projects_online_by_default": true,
1911 "terminal": {
1912 "font_family": "FiraCode Nerd Font Mono",
1913 "blinking": "off"
1914 },
1915 "languages": {
1916 "C": {
1917 "format_on_save": "language_server",
1918 "preferred_line_length": 64,
1919 "soft_wrap": "preferred_line_length"
1920 }
1921 }
1922}
1923```