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 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- `copilot`
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_copilot_suggestions`
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 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 a subset of OpenType features that can be enabled or disabled for a given buffer or terminal font. The following [OpenType features](https://en.wikipedia.org/wiki/List_of_typographic_features) can be enabled or disabled too: `calt`, `case`, `cpsp`, `frac`, `liga`, `onum`, `ordn`, `pnum`, `ss01`, `ss02`, `ss03`, `ss04`, `ss05`, `ss06`, `ss07`, `ss08`, `ss09`, `ss10`, `ss11`, `ss12`, `ss13`, `ss14`, `ss15`, `ss16`, `ss17`, `ss18`, `ss19`, `ss20`, `subs`, `sups`, `swsh`, `titl`, `tnum`, `zero`.
114
115For example, to disable ligatures for a given font you can add the following to your settings:
116
117```json
118{
119 "buffer_font_features": {
120 "calt": false
121 }
122}
123```
124
125## Buffer Font Size
126
127- Description: The default font size for text in the editor.
128- Setting: `buffer_font_size`
129- Default: `15`
130
131**Options**
132
133`integer` values
134
135## Confirm Quit
136
137- Description: Whether or not to prompt the user to confirm before closing the application.
138- Setting: `confirm_quit`
139- Default: `false`
140
141**Options**
142
143`boolean` values
144
145## Centered Layout
146
147- Description: Configuration for the centered layout mode.
148- Setting: `centered_layout`
149- Default:
150
151```json
152"centered_layout": {
153 "left_padding": 0.2,
154 "right_padding": 0.2,
155}
156```
157
158**Options**
159
160The `left_padding` and `right_padding` options define the relative width of the
161left 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`.
162
163## Copilot
164
165- Description: Copilot-specific settings.
166- Setting: `copilot`
167- Default:
168
169```json
170"copilot": {
171 "disabled_globs": [
172 ".env"
173 ]
174}
175```
176
177**Options**
178
179### Disabled Globs
180
181- Description: The set of glob patterns for which Copilot should be disabled in any matching file.
182- Setting: `disabled_globs`
183- Default: [".env"]
184
185**Options**
186
187List of `string` values
188
189## Current Line Highlight
190
191- Description: How to highlight the current line in the editor.
192- Setting: `current_line_highlight`
193- Default: `all`
194
195**Options**
196
1971. Don't highlight the current line:
198
199```json
200"current_line_highlight": "none"
201```
202
2032. Highlight the gutter area.
204
205```json
206"current_line_highlight": "gutter"
207```
208
2093. Highlight the editor area.
210
211```json
212"current_line_highlight": "line"
213```
214
2154. Highlight the full line.
216
217```json
218"current_line_highlight": "all"
219```
220
221## Cursor Blink
222
223- Description: Whether or not the cursor blinks.
224- Setting: `cursor_blink`
225- Default: `true`
226
227**Options**
228
229`boolean` values
230
231## Default Dock Anchor
232
233- Description: The default anchor for new docks.
234- Setting: `default_dock_anchor`
235- Default: `bottom`
236
237**Options**
238
2391. Position the dock attached to the bottom of the workspace: `bottom`
2402. Position the dock to the right of the workspace like a side panel: `right`
2413. Position the dock full screen over the entire workspace: `expanded`
242
243## Editor Scrollbar
244
245- Description: Whether or not to show the editor scrollbar and various elements in it.
246- Setting: `scrollbar`
247- Default:
248
249```json
250"scrollbar": {
251 "show": "auto",
252 "cursors": true,
253 "git_diff": true,
254 "search_results": true,
255 "selected_symbol": true,
256 "diagnostics": true
257},
258```
259
260### Show Mode
261
262- Description: When to show the editor scrollbar.
263- Setting: `show`
264- Default: `auto`
265
266**Options**
267
2681. Show the scrollbar if there's important information or follow the system's configured behavior:
269
270```json
271"scrollbar": {
272 "show": "auto"
273}
274```
275
2762. Match the system's configured behavior:
277
278```json
279"scrollbar": {
280 "show": "system"
281}
282```
283
2843. Always show the scrollbar:
285
286```json
287"scrollbar": {
288 "show": "always"
289}
290```
291
2924. Never show the scrollbar:
293
294```json
295"scrollbar": {
296 "show": "never"
297}
298```
299
300### Cursor Indicators
301
302- Description: Whether to show cursor positions in the scrollbar.
303- Setting: `cursors`
304- Default: `true`
305
306**Options**
307
308`boolean` values
309
310### Git Diff Indicators
311
312- Description: Whether to show git diff indicators in the scrollbar.
313- Setting: `git_diff`
314- Default: `true`
315
316**Options**
317
318`boolean` values
319
320### Search Results Indicators
321
322- Description: Whether to show buffer search results in the scrollbar.
323- Setting: `search_results`
324- Default: `true`
325
326**Options**
327
328`boolean` values
329
330### Selected Symbols Indicators
331
332- Description: Whether to show selected symbol occurrences in the scrollbar.
333- Setting: `selected_symbol`
334- Default: `true`
335
336**Options**
337
338`boolean` values
339
340### Diagnostics
341
342- Description: Whether to show diagnostic indicators in the scrollbar.
343- Setting: `diagnostics`
344- Default: `true`
345
346**Options**
347
348`boolean` values
349
350## Editor Tab Bar
351
352- Description: Settings related to the editor's tab bar.
353- Settings: `tab_bar`
354- Default:
355
356```json
357"tab_bar": {
358 "show": true,
359 "show_nav_history_buttons": true
360}
361```
362
363### Show
364
365- Description: Whether or not to show the tab bar in the editor.
366- Setting: `show`
367- Default: `true`
368
369**Options**
370
371`boolean` values
372
373### Navigation History Buttons
374
375- Description: Whether or not to show the navigation history buttons.
376- Setting: `show_nav_history_buttons`
377- Default: `true`
378
379**Options**
380
381`boolean` values
382
383## Editor Tabs
384
385- Description: Configuration for the editor tabs.
386- Setting: `tabs`
387- Default:
388
389```json
390"tabs": {
391 "close_position": "right",
392 "git_status": false
393},
394```
395
396### Close Position
397
398- Description: Where to display close button within a tab.
399- Setting: `close_position`
400- Default: `right`
401
402**Options**
403
4041. Display the close button on the right:
405
406```json
407{
408 "close_position": "right"
409}
410```
411
4122. Display the close button on the left:
413
414```json
415{
416 "close_position": "left"
417}
418```
419
420### Git Status
421
422- Description: Whether or not to show Git file status in tab.
423- Setting: `git_status`
424- Default: `false`
425
426## Editor Toolbar
427
428- Description: Whether or not to show various elements in the editor toolbar.
429- Setting: `toolbar`
430- Default:
431
432```json
433"toolbar": {
434 "breadcrumbs": true,
435 "quick_actions": true
436},
437```
438
439**Options**
440
441Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
442
443## Enable Language Server
444
445- Description: Whether or not to use language servers to provide code intelligence.
446- Setting: `enable_language_server`
447- Default: `true`
448
449**Options**
450
451`boolean` values
452
453## Ensure Final Newline On Save
454
455- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
456- Setting: `ensure_final_newline_on_save`
457- Default: `true`
458
459**Options**
460
461`boolean` values
462
463## LSP
464
465- Description: Configuration for language servers.
466- Setting: `lsp`
467- Default: `null`
468
469**Options**
470
471The following settings can be overridden for specific language servers:
472
473- `initialization_options`
474
475To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
476
477```json
478"lsp": {
479 "rust-analyzer": {
480 "initialization_options": {
481 "check": {
482 "command": "clippy" // rust-analyzer.check.command (default: "check")
483 }
484 }
485 }
486}
487```
488
489## Format On Save
490
491- Description: Whether or not to perform a buffer format before saving.
492- Setting: `format_on_save`
493- Default: `on`
494
495**Options**
496
4971. `on`, enables format on save obeying `formatter` setting:
498
499```json
500{
501 "format_on_save": "on"
502}
503```
504
5052. `off`, disables format on save:
506
507```json
508{
509 "format_on_save": "off"
510}
511```
512
513## Formatter
514
515- Description: How to perform a buffer format.
516- Setting: `formatter`
517- Default: `auto`
518
519**Options**
520
5211. To use the current language server, use `"language_server"`:
522
523```json
524{
525 "formatter": "language_server"
526}
527```
528
5292. 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):
530
531```json
532{
533 "formatter": {
534 "external": {
535 "command": "sed",
536 "arguments": ["-e", "s/ *$//"]
537 }
538 }
539}
540```
541
5423. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
543
544```json
545{
546 "formatter": {
547 "code_actions": {
548 // Use ESLint's --fix:
549 "source.fixAll.eslint": true,
550 // Organize imports on save:
551 "source.organizeImports": true
552 }
553 }
554}
555```
556
557## Code Actions On Format
558
559- Description: The code actions to perform with the primary language server when formatting the buffer.
560- Setting: `code_actions_on_format`
561- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
562
563**Examples**
564
5651. Organize imports on format in TypeScript and TSX buffers:
566
567```json
568{
569 "languages": {
570 "TypeScript": {
571 "code_actions_on_format": {
572 "source.organizeImports": true
573 }
574 },
575 "TSX": {
576 "code_actions_on_format": {
577 "source.organizeImports": true
578 }
579 }
580 }
581}
582```
583
5842. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
585
586```json
587{
588 "languages": {
589 "JavaScript": {
590 "code_actions_on_format": {
591 "source.fixAll.eslint": true
592 }
593 }
594 }
595}
596```
597
5983. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
599
600```json
601{
602 "languages": {
603 "JavaScript": {
604 "code_actions_on_format": {
605 "source.fixAll.eslint": true
606 }
607 }
608 },
609 "lsp": {
610 "eslint": {
611 "settings": {
612 "codeActionOnSave": {
613 "rules": ["import/order"]
614 }
615 }
616 }
617 }
618}
619```
620
621## Auto close
622
623- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
624- Setting: `use_autoclose`
625- Default: `true`
626
627**Options**
628
629`boolean` values
630
631## Always Treat Brackets As Autoclosed
632
633- Description: Controls how the editor handles the autoclosed characters.
634- Setting: `always_treat_brackets_as_autoclosed`
635- Default: `false`
636
637**Options**
638
639`boolean` values
640
641**Example**
642
643If the setting is set to `true`:
644
6451. Enter in the editor: `)))`
6462. Move the cursor to the start: `^)))`
6473. Enter again: `)))`
648
649The result is still `)))` and not `))))))`, which is what it would be by default.
650
651## File Types
652
653- Setting: `file_types`
654- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
655- Default: `{}`
656
657**Examples**
658
659To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
660
661```json
662{
663 "file_types": {
664 "C++": ["c"],
665 "TOML": ["MyLockFile"],
666 "Dockerfile": ["Dockerfile*"]
667 }
668}
669```
670
671## Git
672
673- Description: Configuration for git-related features.
674- Setting: `git`
675- Default:
676
677```json
678{
679 "git": {
680 "git_gutter": "tracked_files",
681 "inline_blame": {
682 "enabled": true
683 }
684 }
685}
686```
687
688### Git Gutter
689
690- Description: Whether or not to show the git gutter.
691- Setting: `git_gutter`
692- Default: `tracked_files`
693
694**Options**
695
6961. Show git gutter in tracked files
697
698```json
699{
700 "git": {
701 "git_gutter": "tracked_files"
702 }
703}
704```
705
7062. Hide git gutter
707
708```json
709{
710 "git": {
711 "git_gutter": "hide"
712 }
713}
714```
715
716### Inline Git Blame
717
718- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
719- Setting: `inline_blame`
720- Default:
721
722```json
723{
724 "git": {
725 "inline_blame": {
726 "enabled": true
727 }
728 }
729}
730```
731
732**Options**
733
7341. Disable inline git blame:
735
736```json
737{
738 "git": {
739 "inline_blame": {
740 "enabled": false
741 }
742 }
743}
744```
745
7462. Only show inline git blame after a delay (that starts after cursor stops moving):
747
748```json
749{
750 "git": {
751 "inline_blame": {
752 "enabled": false,
753 "delay_ms": 500
754 }
755 }
756}
757```
758
759## Hard Tabs
760
761- Description: Whether to indent lines using tab characters or multiple spaces.
762- Setting: `hard_tabs`
763- Default: `false`
764
765**Options**
766
767`boolean` values
768
769## Hover Popover Enabled
770
771- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
772- Setting: `hover_popover_enabled`
773- Default: `true`
774
775**Options**
776
777`boolean` values
778
779## Inlay hints
780
781- Description: Configuration for displaying extra text with hints in the editor.
782- Setting: `inlay_hints`
783- Default:
784
785```json
786"inlay_hints": {
787 "enabled": false,
788 "show_type_hints": true,
789 "show_parameter_hints": true,
790 "show_other_hints": true,
791 "edit_debounce_ms": 700,
792 "scroll_debounce_ms": 50
793}
794```
795
796**Options**
797
798Inlay hints querying consists of two parts: editor (client) and LSP server.
799With 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.
800At 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.
801
802The following languages have inlay hints preconfigured by Zed:
803
804- [Go](https://docs.zed.dev/languages/go)
805- [Rust](https://docs.zed.dev/languages/rust)
806- [Svelte](https://docs.zed.dev/languages/svelte)
807- [Typescript](https://docs.zed.dev/languages/typescript)
808
809Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
810
811Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
812Settings-related hint updates are not debounced.
813
814## Journal
815
816- Description: Configuration for the journal.
817- Setting: `journal`
818- Default:
819
820```json
821"journal": {
822 "path": "~",
823 "hour_format": "hour12"
824}
825```
826
827### Path
828
829- Description: The path of the directory where journal entries are stored.
830- Setting: `path`
831- Default: `~`
832
833**Options**
834
835`string` values
836
837### Hour Format
838
839- Description: The format to use for displaying hours in the journal.
840- Setting: `hour_format`
841- Default: `hour12`
842
843**Options**
844
8451. 12-hour format:
846
847```json
848{
849 "hour_format": "hour12"
850}
851```
852
8532. 24-hour format:
854
855```json
856{
857 "hour_format": "hour24"
858}
859```
860
861## Languages
862
863- Description: Configuration for specific languages.
864- Setting: `languages`
865- Default: `null`
866
867**Options**
868
869To override settings for a language, add an entry for that languages name to the `languages` value. Example:
870
871```json
872"languages": {
873 "C": {
874 "format_on_save": "off",
875 "preferred_line_length": 64,
876 "soft_wrap": "preferred_line_length"
877 },
878 "JSON": {
879 "tab_size": 4
880 }
881}
882```
883
884The following settings can be overridden for each specific language:
885
886- `enable_language_server`
887- `ensure_final_newline_on_save`
888- `format_on_save`
889- `formatter`
890- `hard_tabs`
891- `preferred_line_length`
892- `remove_trailing_whitespace_on_save`
893- `show_copilot_suggestions`
894- `show_whitespaces`
895- `soft_wrap`
896- `tab_size`
897- `use_autoclose`
898- `always_treat_brackets_as_autoclosed`
899
900These values take in the same options as the root-level settings with the same name.
901
902## Preview tabs
903
904- Description:
905 (requires Zed `0.132.x`) \
906 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. \
907 There are several ways to convert a preview tab into a regular tab:
908
909 - Double-clicking on the file
910 - Double-clicking on the tab header
911 - Using the `project_panel::OpenPermanent` action
912 - Editing the file
913 - Dragging the file to a different pane
914
915- Setting: `preview_tabs`
916- Default:
917
918```json
919"preview_tabs": {
920 "enabled": true,
921 "enable_preview_from_file_finder": false,
922 "enable_preview_from_code_navigation": false,
923}
924```
925
926### Enable preview from file finder
927
928- Description: Determines whether to open files in preview mode when selected from the file finder.
929- Setting: `enable_preview_from_file_finder`
930- Default: `false`
931
932**Options**
933
934`boolean` values
935
936### Enable preview from code navigation
937
938- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab (requires Zed `0.134.x`).
939- Setting: `enable_preview_from_code_navigation`
940- Default: `false`
941
942**Options**
943
944`boolean` values
945
946## Preferred Line Length
947
948- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
949- Setting: `preferred_line_length`
950- Default: `80`
951
952**Options**
953
954`integer` values
955
956## Projects Online By Default
957
958- Description: Whether or not to show the online projects view by default.
959- Setting: `projects_online_by_default`
960- Default: `true`
961
962**Options**
963
964`boolean` values
965
966## Remove Trailing Whitespace On Save
967
968- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
969- Setting: `remove_trailing_whitespace_on_save`
970- Default: `true`
971
972**Options**
973
974`boolean` values
975
976## Show Call Status Icon
977
978- Description: Whether or not to show the call status icon in the status bar.
979- Setting: `show_call_status_icon`
980- Default: `true`
981
982**Options**
983
984`boolean` values
985
986## Show Completions On Input
987
988- Description: Whether or not to show completions as you type.
989- Setting: `show_completions_on_input`
990- Default: `true`
991
992**Options**
993
994`boolean` values
995
996## Show Completion Documentation
997
998- Description: Whether to display inline and alongside documentation for items in the completions menu.
999- Setting: `show_completion_documentation`
1000- Default: `true`
1001
1002**Options**
1003
1004`boolean` values
1005
1006## Completion Documentation Debounce Delay
1007
1008- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1009- Setting: `completion_documentation_secondary_query_debounce`
1010- Default: `300` ms
1011
1012**Options**
1013
1014`integer` values
1015
1016## Show Copilot Suggestions
1017
1018- Description: Whether or not to show Copilot suggestions as you type or wait for a `copilot::Toggle`.
1019- Setting: `show_copilot_suggestions`
1020- Default: `true`
1021
1022**Options**
1023
1024`boolean` values
1025
1026## Show Whitespaces
1027
1028- Description: Whether or not to show render whitespace characters in the editor.
1029- Setting: `show_whitespaces`
1030- Default: `selection`
1031
1032**Options**
1033
10341. `all`
10352. `selection`
10363. `none`
1037
1038## Soft Wrap
1039
1040- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1041- Setting: `soft_wrap`
1042- Default: `none`
1043
1044**Options**
1045
10461. `editor_width`
10472. `preferred_line_length`
10483. `none`
1049
1050## Tab Size
1051
1052- Description: The number of spaces to use for each tab character.
1053- Setting: `tab_size`
1054- Default: `4`
1055
1056**Options**
1057
1058`integer` values
1059
1060## Telemetry
1061
1062- Description: Control what info is collected by Zed.
1063- Setting: `telemetry`
1064- Default:
1065
1066```json
1067"telemetry": {
1068 "diagnostics": true,
1069 "metrics": true
1070},
1071```
1072
1073**Options**
1074
1075### Diagnostics
1076
1077- Description: Setting for sending debug-related data, such as crash reports.
1078- Setting: `diagnostics`
1079- Default: `true`
1080
1081**Options**
1082
1083`boolean` values
1084
1085### Metrics
1086
1087- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1088- Setting: `metrics`
1089- Default: `true`
1090
1091**Options**
1092
1093`boolean` values
1094
1095## Terminal
1096
1097- Description: Configuration for the terminal.
1098- Setting: `terminal`
1099- Default:
1100
1101```json
1102"terminal": {
1103 "alternate_scroll": "off",
1104 "blinking": "terminal_controlled",
1105 "copy_on_select": false,
1106 "env": {},
1107 "font_family": null,
1108 "font_features": null,
1109 "font_size": null,
1110 "option_as_meta": false,
1111 "button": false,
1112 "shell": {},
1113 "toolbar": {
1114 "title": true
1115 },
1116 "working_directory": "current_project_directory"
1117}
1118```
1119
1120### Alternate Scroll
1121
1122- 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.
1123- Setting: `alternate_scroll`
1124- Default: `off`
1125
1126**Options**
1127
11281. Default alternate scroll mode to on
1129
1130```json
1131{
1132 "alternate_scroll": "on"
1133}
1134```
1135
11362. Default alternate scroll mode to off
1137
1138```json
1139{
1140 "alternate_scroll": "off"
1141}
1142```
1143
1144### Blinking
1145
1146- Description: Set the cursor blinking behavior in the terminal
1147- Setting: `blinking`
1148- Default: `terminal_controlled`
1149
1150**Options**
1151
11521. Never blink the cursor, ignore the terminal mode
1153
1154```json
1155{
1156 "blinking": "off"
1157}
1158```
1159
11602. Default the cursor blink to off, but allow the terminal to turn blinking on
1161
1162```json
1163{
1164 "blinking": "terminal_controlled"
1165}
1166```
1167
11683. Always blink the cursor, ignore the terminal mode
1169
1170```json
1171"blinking": "on",
1172```
1173
1174### Copy On Select
1175
1176- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1177- Setting: `copy_on_select`
1178- Default: `false`
1179
1180**Options**
1181
1182`boolean` values
1183
1184### Env
1185
1186- 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
1187- Setting: `env`
1188- Default: `{}`
1189
1190**Example**
1191
1192```json
1193"env": {
1194 "ZED": "1",
1195 "KEY": "value1:value2"
1196}
1197```
1198
1199### Font Size
1200
1201- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1202- Setting: `font_size`
1203- Default: `null`
1204
1205**Options**
1206
1207`integer` values
1208
1209### Font Family
1210
1211- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1212- Setting: `font_family`
1213- Default: `null`
1214
1215**Options**
1216
1217The name of any font family installed on the user's system
1218
1219### Font Features
1220
1221- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1222- Setting: `font_features`
1223- Default: `null`
1224
1225**Options**
1226
1227See Buffer Font Features
1228
1229### Option As Meta
1230
1231- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1232- Setting: `option_as_meta`
1233- Default: `true`
1234
1235**Options**
1236
1237`boolean` values
1238
1239### Shell
1240
1241- Description: What shell to use when launching the terminal.
1242- Setting: `shell`
1243- Default: `system`
1244
1245**Options**
1246
12471. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1248
1249```json
1250{
1251 "shell": "system"
1252}
1253```
1254
12552. A program to launch:
1256
1257```json
1258"shell": {
1259 "program": "sh"
1260}
1261```
1262
12633. A program with arguments:
1264
1265```json
1266"shell": {
1267 "with_arguments": {
1268 "program": "/bin/bash",
1269 "args": ["--login"]
1270 }
1271}
1272```
1273
1274## Terminal Toolbar
1275
1276- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1277- Setting: `toolbar`
1278- Default:
1279
1280```json
1281"toolbar": {
1282 "title": true,
1283},
1284```
1285
1286**Options**
1287
1288At 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.
1289
1290### Terminal Button
1291
1292- Description: Control to show or hide the terminal button in the status bar
1293- Setting: `button`
1294- Default: `true`
1295
1296**Options**
1297
1298`boolean` values
1299
1300### Working Directory
1301
1302- Description: What working directory to use when launching the terminal.
1303- Setting: `working_directory`
1304- Default: `"current_project_directory"`
1305
1306**Options**
1307
13081. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1309
1310```json
1311{
1312 "working_directory": "current_project_directory"
1313}
1314```
1315
13162. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1317
1318```json
1319{
1320 "working_directory": "first_project_directory"
1321}
1322```
1323
13243. Always use this platform's home directory (if we can find it)
1325
1326```json
1327{
1328 "working_directory": "always_home"
1329}
1330```
1331
13324. 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.
1333
1334```json
1335"working_directory": {
1336 "always": {
1337 "directory": "~/zed/projects/"
1338 }
1339}
1340```
1341
1342## Theme
1343
1344- 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.
1345- Setting: `theme`
1346- Default: `One Dark`
1347
1348### Theme Object
1349
1350- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1351- Setting: `theme`
1352- Default:
1353
1354```json
1355"theme": {
1356 "mode": "dark",
1357 "dark": "One Dark",
1358 "light": "One Light"
1359},
1360```
1361
1362### Mode
1363
1364- Description: Specify theme mode.
1365- Setting: `mode`
1366- Default: `dark`
1367
1368**Options**
1369
13701. Set the theme to dark mode
1371
1372```json
1373{
1374 "mode": "dark"
1375}
1376```
1377
13782. Set the theme to light mode
1379
1380```json
1381{
1382 "mode": "light"
1383}
1384```
1385
13863. Set the theme to system mode
1387
1388```json
1389{
1390 "mode": "system"
1391}
1392```
1393
1394### Dark
1395
1396- Description: The name of the dark Zed theme to use for the UI.
1397- Setting: `dark`
1398- Default: `One Dark`
1399
1400**Options**
1401
1402Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1403
1404### Light
1405
1406- Description: The name of the light Zed theme to use for the UI.
1407- Setting: `light`
1408- Default: `One Light`
1409
1410**Options**
1411
1412Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1413
1414## Vim
1415
1416- Description: Whether or not to enable vim mode (work in progress).
1417- Setting: `vim_mode`
1418- Default: `false`
1419
1420## Project Panel
1421
1422- Description: Customise project panel
1423- Setting: `project_panel`
1424- Default:
1425
1426```json
1427"project_panel": {
1428 "button": true,
1429 "dock": "left",
1430 "git_status": true,
1431 "default_width": "N/A - width in pixels"
1432},
1433```
1434
1435### Dock
1436
1437- Description: Control the position of the dock
1438- Setting: `dock`
1439- Default: `left`
1440
1441**Options**
1442
14431. Default dock position to left
1444
1445```json
1446{
1447 "dock": "left"
1448}
1449```
1450
14512. Default dock position to right
1452
1453```json
1454{
1455 "dock": "right"
1456}
1457```
1458
1459### Git Status
1460
1461- Description: Indicates newly created and updated files
1462- Setting: `git_status`
1463- Default: `true`
1464
14651. Default enable git status
1466
1467```json
1468{
1469 "git_status": true
1470}
1471```
1472
14732. Default disable git status
1474
1475```json
1476{
1477 "git_status": false
1478}
1479```
1480
1481### Default Width
1482
1483- Description: Customise default width taken by project panel
1484- Setting: `default_width`
1485- Default: N/A width in pixels (eg: 420)
1486
1487**Options**
1488
1489`boolean` values
1490
1491## Calls
1492
1493- Description: Customise behaviour when participating in a call
1494- Setting: `calls`
1495- Default:
1496
1497```json
1498"calls": {
1499 // Join calls with the microphone live by default
1500 "mute_on_join": false,
1501 // Share your project when you are the first to join a channel
1502 "share_on_join": true
1503},
1504```
1505
1506## An example configuration:
1507
1508```json
1509// ~/.config/zed/settings.json
1510{
1511 "theme": "cave-light",
1512 "tab_size": 2,
1513 "preferred_line_length": 80,
1514 "soft_wrap": "none",
1515
1516 "buffer_font_size": 18,
1517 "buffer_font_family": "Zed Mono",
1518
1519 "autosave": "on_focus_change",
1520 "format_on_save": "off",
1521 "vim_mode": false,
1522 "projects_online_by_default": true,
1523 "terminal": {
1524 "font_family": "FiraCode Nerd Font Mono",
1525 "blinking": "off"
1526 },
1527 "languages": {
1528 "C": {
1529 "format_on_save": "language_server",
1530 "preferred_line_length": 64,
1531 "soft_wrap": "preferred_line_length"
1532 }
1533 }
1534}
1535```