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