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 {#kb zed::OpenSettings}. 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 {#action zed::OpenLocalSettings} 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 {#action zed::OpenDefaultSettings} 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- Platform: macOS and Windows.
112
113**Options**
114
115Zed 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.
116
117For example, to disable font ligatures, add the following to your settings:
118
119```json
120{
121 "buffer_font_features": {
122 "calt": false
123 }
124}
125```
126
127You can also set other OpenType features, like setting `cv01` to `7`:
128
129```json
130{
131 "buffer_font_features": {
132 "cv01": 7
133 }
134}
135```
136
137## Buffer Font Fallbacks
138
139- Description: Set the buffer text's font fallbacks, this will be merged with the platform's default fallbacks.
140- Setting: `buffer_font_fallbacks`
141- Default: `null`
142- Platform: macOS and Windows.
143
144**Options**
145
146For example, to use `Nerd Font` as a fallback, add the following to your settings:
147
148```json
149{
150 "buffer_font_fallbacks": ["Nerd Font"]
151}
152```
153
154## Buffer Font Size
155
156- Description: The default font size for text in the editor.
157- Setting: `buffer_font_size`
158- Default: `15`
159
160**Options**
161
162`integer` values
163
164## Buffer Font Weight
165
166- Description: The default font weight for text in the editor.
167- Setting: `buffer_font_weight`
168- Default: `400`
169
170**Options**
171
172`integer` values between `100` and `900`
173
174## Buffer Line Height
175
176- Description: The default line height for text in the editor.
177- Setting: `buffer_line_height`
178- Default: `"comfortable"`
179
180**Options**
181
182`"standard"`, `"comfortable"` or `{"custom": float}` (`1` is very compact, `2` very loose)
183
184## Confirm Quit
185
186- Description: Whether or not to prompt the user to confirm before closing the application.
187- Setting: `confirm_quit`
188- Default: `false`
189
190**Options**
191
192`boolean` values
193
194## Centered Layout
195
196- Description: Configuration for the centered layout mode.
197- Setting: `centered_layout`
198- Default:
199
200```json
201"centered_layout": {
202 "left_padding": 0.2,
203 "right_padding": 0.2,
204}
205```
206
207**Options**
208
209The `left_padding` and `right_padding` options define the relative width of the
210left 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`.
211
212## Direnv Integration
213
214- 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.
215- Setting: `load_direnv`
216- Default:
217
218```json
219"load_direnv": "shell_hook"
220```
221
222**Options**
223There are two options to choose from:
224
2251. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
2262. `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.
227
228## Inline Completions
229
230- Description: Settings for inline completions.
231- Setting: `inline_completions`
232- Default:
233
234```json
235"inline_completions": {
236 "disabled_globs": [
237 ".env"
238 ]
239}
240```
241
242**Options**
243
244### Disabled Globs
245
246- Description: A list of globs representing files that inline completions should be disabled for.
247- Setting: `disabled_globs`
248- Default: `[".env"]`
249
250**Options**
251
252List of `string` values
253
254## Current Line Highlight
255
256- Description: How to highlight the current line in the editor.
257- Setting: `current_line_highlight`
258- Default: `all`
259
260**Options**
261
2621. Don't highlight the current line:
263
264```json
265"current_line_highlight": "none"
266```
267
2682. Highlight the gutter area:
269
270```json
271"current_line_highlight": "gutter"
272```
273
2743. Highlight the editor area:
275
276```json
277"current_line_highlight": "line"
278```
279
2804. Highlight the full line:
281
282```json
283"current_line_highlight": "all"
284```
285
286## Cursor Blink
287
288- Description: Whether or not the cursor blinks.
289- Setting: `cursor_blink`
290- Default: `true`
291
292**Options**
293
294`boolean` values
295
296## Cursor Shape
297
298- Description: Cursor shape for the default editor.
299- Setting: `cursor_shape`
300- Default: `bar`
301
302**Options**
303
3041. A vertical bar:
305
306```json
307"cursor_shape": "bar"
308```
309
3102. A block that surrounds the following character:
311
312```json
313"cursor_shape": "block"
314```
315
3163. An underline that runs along the following character:
317
318```json
319"cursor_shape": "underline"
320```
321
3224. An box drawn around the following character:
323
324```json
325"cursor_shape": "hollow"
326```
327
328## Default Dock Anchor
329
330- Description: The default anchor for new docks.
331- Setting: `default_dock_anchor`
332- Default: `bottom`
333
334**Options**
335
3361. Position the dock attached to the bottom of the workspace: `bottom`
3372. Position the dock to the right of the workspace like a side panel: `right`
3383. Position the dock full screen over the entire workspace: `expanded`
339
340## Editor Scrollbar
341
342- Description: Whether or not to show the editor scrollbar and various elements in it.
343- Setting: `scrollbar`
344- Default:
345
346```json
347"scrollbar": {
348 "show": "auto",
349 "cursors": true,
350 "git_diff": true,
351 "search_results": true,
352 "selected_symbol": true,
353 "diagnostics": true
354},
355```
356
357### Show Mode
358
359- Description: When to show the editor scrollbar.
360- Setting: `show`
361- Default: `auto`
362
363**Options**
364
3651. Show the scrollbar if there's important information or follow the system's configured behavior:
366
367```json
368"scrollbar": {
369 "show": "auto"
370}
371```
372
3732. Match the system's configured behavior:
374
375```json
376"scrollbar": {
377 "show": "system"
378}
379```
380
3813. Always show the scrollbar:
382
383```json
384"scrollbar": {
385 "show": "always"
386}
387```
388
3894. Never show the scrollbar:
390
391```json
392"scrollbar": {
393 "show": "never"
394}
395```
396
397### Cursor Indicators
398
399- Description: Whether to show cursor positions in the scrollbar.
400- Setting: `cursors`
401- Default: `true`
402
403**Options**
404
405`boolean` values
406
407### Git Diff Indicators
408
409- Description: Whether to show git diff indicators in the scrollbar.
410- Setting: `git_diff`
411- Default: `true`
412
413**Options**
414
415`boolean` values
416
417### Search Results Indicators
418
419- Description: Whether to show buffer search results in the scrollbar.
420- Setting: `search_results`
421- Default: `true`
422
423**Options**
424
425`boolean` values
426
427### Selected Symbols Indicators
428
429- Description: Whether to show selected symbol occurrences in the scrollbar.
430- Setting: `selected_symbol`
431- Default: `true`
432
433**Options**
434
435`boolean` values
436
437### Diagnostics
438
439- Description: Whether to show diagnostic indicators in the scrollbar.
440- Setting: `diagnostics`
441- Default: `true`
442
443**Options**
444
445`boolean` values
446
447## Editor Tab Bar
448
449- Description: Settings related to the editor's tab bar.
450- Settings: `tab_bar`
451- Default:
452
453```json
454"tab_bar": {
455 "show": true,
456 "show_nav_history_buttons": true
457}
458```
459
460### Show
461
462- Description: Whether or not to show the tab bar in the editor.
463- Setting: `show`
464- Default: `true`
465
466**Options**
467
468`boolean` values
469
470### Navigation History Buttons
471
472- Description: Whether or not to show the navigation history buttons.
473- Setting: `show_nav_history_buttons`
474- Default: `true`
475
476**Options**
477
478`boolean` values
479
480## Editor Tabs
481
482- Description: Configuration for the editor tabs.
483- Setting: `tabs`
484- Default:
485
486```json
487"tabs": {
488 "close_position": "right",
489 "file_icons": false,
490 "git_status": false
491},
492```
493
494### Close Position
495
496- Description: Where to display close button within a tab.
497- Setting: `close_position`
498- Default: `right`
499
500**Options**
501
5021. Display the close button on the right:
503
504```json
505{
506 "close_position": "right"
507}
508```
509
5102. Display the close button on the left:
511
512```json
513{
514 "close_position": "left"
515}
516```
517
518### File Icons
519
520- Description: Whether to show the file icon for a tab.
521- Setting: `file_icons`
522- Default: `false`
523
524### Git Status
525
526- Description: Whether or not to show Git file status in tab.
527- Setting: `git_status`
528- Default: `false`
529
530## Editor Toolbar
531
532- Description: Whether or not to show various elements in the editor toolbar.
533- Setting: `toolbar`
534- Default:
535
536```json
537"toolbar": {
538 "breadcrumbs": true,
539 "quick_actions": true
540},
541```
542
543**Options**
544
545Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
546
547## Enable Language Server
548
549- Description: Whether or not to use language servers to provide code intelligence.
550- Setting: `enable_language_server`
551- Default: `true`
552
553**Options**
554
555`boolean` values
556
557## Ensure Final Newline On Save
558
559- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
560- Setting: `ensure_final_newline_on_save`
561- Default: `true`
562
563**Options**
564
565`boolean` values
566
567## LSP
568
569- Description: Configuration for language servers.
570- Setting: `lsp`
571- Default: `null`
572
573**Options**
574
575The following settings can be overridden for specific language servers:
576
577- `initialization_options`
578
579To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
580
581```json
582"lsp": {
583 "rust-analyzer": {
584 "initialization_options": {
585 "check": {
586 "command": "clippy" // rust-analyzer.check.command (default: "check")
587 }
588 }
589 }
590}
591```
592
593## Format On Save
594
595- Description: Whether or not to perform a buffer format before saving.
596- Setting: `format_on_save`
597- Default: `on`
598
599**Options**
600
6011. `on`, enables format on save obeying `formatter` setting:
602
603```json
604{
605 "format_on_save": "on"
606}
607```
608
6092. `off`, disables format on save:
610
611```json
612{
613 "format_on_save": "off"
614}
615```
616
617## Formatter
618
619- Description: How to perform a buffer format.
620- Setting: `formatter`
621- Default: `auto`
622
623**Options**
624
6251. To use the current language server, use `"language_server"`:
626
627```json
628{
629 "formatter": "language_server"
630}
631```
632
6332. 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):
634
635```json
636{
637 "formatter": {
638 "external": {
639 "command": "sed",
640 "arguments": ["-e", "s/ *$//"]
641 }
642 }
643}
644```
645
6463. Or to use code actions provided by the connected language servers, use `"code_actions"`:
647
648```json
649{
650 "formatter": {
651 "code_actions": {
652 // Use ESLint's --fix:
653 "source.fixAll.eslint": true,
654 // Organize imports on save:
655 "source.organizeImports": true
656 }
657 }
658}
659```
660
6614. Or to use multiple formatters consecutively, use an array of formatters:
662
663```json
664{
665 "formatter": [
666 {"language_server": {"name": "rust-analyzer"}},
667 {"external": {
668 "command": "sed",
669 "arguments": ["-e", "s/ *$//"]
670 }
671 ]
672}
673```
674
675Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
676If any of the formatters fails, the subsequent ones will still be executed.
677
678## Code Actions On Format
679
680- Description: The code actions to perform with the primary language server when formatting the buffer.
681- Setting: `code_actions_on_format`
682- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
683
684**Examples**
685
686<!--
687TBD: Add Python Ruff source.organizeImports example
688-->
689
6901. Organize imports on format in TypeScript and TSX buffers:
691
692```json
693{
694 "languages": {
695 "TypeScript": {
696 "code_actions_on_format": {
697 "source.organizeImports": true
698 }
699 },
700 "TSX": {
701 "code_actions_on_format": {
702 "source.organizeImports": true
703 }
704 }
705 }
706}
707```
708
7092. Run ESLint `fixAll` code action when formatting:
710
711```json
712{
713 "languages": {
714 "JavaScript": {
715 "code_actions_on_format": {
716 "source.fixAll.eslint": true
717 }
718 }
719 }
720}
721```
722
7233. Run only a single ESLint rule when using `fixAll`:
724
725```json
726{
727 "languages": {
728 "JavaScript": {
729 "code_actions_on_format": {
730 "source.fixAll.eslint": true
731 }
732 }
733 },
734 "lsp": {
735 "eslint": {
736 "settings": {
737 "codeActionOnSave": {
738 "rules": ["import/order"]
739 }
740 }
741 }
742 }
743}
744```
745
746## Auto close
747
748- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
749- Setting: `use_autoclose`
750- Default: `true`
751
752**Options**
753
754`boolean` values
755
756## Always Treat Brackets As Autoclosed
757
758- Description: Controls how the editor handles the autoclosed characters.
759- Setting: `always_treat_brackets_as_autoclosed`
760- Default: `false`
761
762**Options**
763
764`boolean` values
765
766**Example**
767
768If the setting is set to `true`:
769
7701. Enter in the editor: `)))`
7712. Move the cursor to the start: `^)))`
7723. Enter again: `)))`
773
774The result is still `)))` and not `))))))`, which is what it would be by default.
775
776## File Types
777
778- Setting: `file_types`
779- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
780- Default: `{}`
781
782**Examples**
783
784To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
785
786```json
787{
788 "file_types": {
789 "C++": ["c"],
790 "TOML": ["MyLockFile"],
791 "Dockerfile": ["Dockerfile*"]
792 }
793}
794```
795
796## Git
797
798- Description: Configuration for git-related features.
799- Setting: `git`
800- Default:
801
802```json
803{
804 "git": {
805 "git_gutter": "tracked_files",
806 "inline_blame": {
807 "enabled": true
808 }
809 }
810}
811```
812
813### Git Gutter
814
815- Description: Whether or not to show the git gutter.
816- Setting: `git_gutter`
817- Default: `tracked_files`
818
819**Options**
820
8211. Show git gutter in tracked files
822
823```json
824{
825 "git": {
826 "git_gutter": "tracked_files"
827 }
828}
829```
830
8312. Hide git gutter
832
833```json
834{
835 "git": {
836 "git_gutter": "hide"
837 }
838}
839```
840
841### Indent Guides
842
843- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
844- Setting: `indent_guides`
845- Default:
846
847```json
848{
849 "indent_guides": {
850 "enabled": true,
851 "line_width": 1,
852 "active_line_width": 1,
853 "coloring": "fixed",
854 "background_coloring": "disabled"
855 }
856}
857```
858
859**Options**
860
8611. Disable indent guides
862
863```json
864{
865 "indent_guides": {
866 "enabled": false
867 }
868}
869```
870
8712. Enable indent guides for a specific language.
872
873```json
874{
875 "languages": {
876 "Python": {
877 "indent_guides": {
878 "enabled": true
879 }
880 }
881 }
882}
883```
884
8853. Enable indent aware coloring ("rainbow indentation").
886 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.
887
888```json
889{
890 "indent_guides": {
891 "enabled": true,
892 "coloring": "indent_aware"
893 }
894}
895```
896
8974. Enable indent aware background coloring ("rainbow indentation").
898 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.
899
900```json
901{
902 "indent_guides": {
903 "enabled": true,
904 "coloring": "indent_aware",
905 "background_coloring": "indent_aware"
906 }
907}
908```
909
910### Inline Git Blame
911
912- Description: Whether or not to show git blame information inline, on the currently focused line.
913- Setting: `inline_blame`
914- Default:
915
916```json
917{
918 "git": {
919 "inline_blame": {
920 "enabled": true
921 }
922 }
923}
924```
925
926**Options**
927
9281. Disable inline git blame:
929
930```json
931{
932 "git": {
933 "inline_blame": {
934 "enabled": false
935 }
936 }
937}
938```
939
9402. Only show inline git blame after a delay (that starts after cursor stops moving):
941
942```json
943{
944 "git": {
945 "inline_blame": {
946 "enabled": true,
947 "delay_ms": 500
948 }
949 }
950}
951```
952
953## Hard Tabs
954
955- Description: Whether to indent lines using tab characters or multiple spaces.
956- Setting: `hard_tabs`
957- Default: `false`
958
959**Options**
960
961`boolean` values
962
963## Hover Popover Enabled
964
965- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
966- Setting: `hover_popover_enabled`
967- Default: `true`
968
969**Options**
970
971`boolean` values
972
973## Inlay hints
974
975- Description: Configuration for displaying extra text with hints in the editor.
976- Setting: `inlay_hints`
977- Default:
978
979```json
980"inlay_hints": {
981 "enabled": false,
982 "show_type_hints": true,
983 "show_parameter_hints": true,
984 "show_other_hints": true,
985 "edit_debounce_ms": 700,
986 "scroll_debounce_ms": 50
987}
988```
989
990**Options**
991
992Inlay hints querying consists of two parts: editor (client) and LSP server.
993With 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.
994At 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.
995
996The following languages have inlay hints preconfigured by Zed:
997
998- [Go](https://docs.zed.dev/languages/go)
999- [Rust](https://docs.zed.dev/languages/rust)
1000- [Svelte](https://docs.zed.dev/languages/svelte)
1001- [Typescript](https://docs.zed.dev/languages/typescript)
1002
1003Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
1004
1005Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
1006Settings-related hint updates are not debounced.
1007
1008## Journal
1009
1010- Description: Configuration for the journal.
1011- Setting: `journal`
1012- Default:
1013
1014```json
1015"journal": {
1016 "path": "~",
1017 "hour_format": "hour12"
1018}
1019```
1020
1021### Path
1022
1023- Description: The path of the directory where journal entries are stored.
1024- Setting: `path`
1025- Default: `~`
1026
1027**Options**
1028
1029`string` values
1030
1031### Hour Format
1032
1033- Description: The format to use for displaying hours in the journal.
1034- Setting: `hour_format`
1035- Default: `hour12`
1036
1037**Options**
1038
10391. 12-hour format:
1040
1041```json
1042{
1043 "hour_format": "hour12"
1044}
1045```
1046
10472. 24-hour format:
1048
1049```json
1050{
1051 "hour_format": "hour24"
1052}
1053```
1054
1055## Languages
1056
1057- Description: Configuration for specific languages.
1058- Setting: `languages`
1059- Default: `null`
1060
1061**Options**
1062
1063To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1064
1065```json
1066"languages": {
1067 "C": {
1068 "format_on_save": "off",
1069 "preferred_line_length": 64,
1070 "soft_wrap": "preferred_line_length"
1071 },
1072 "JSON": {
1073 "tab_size": 4
1074 }
1075}
1076```
1077
1078The following settings can be overridden for each specific language:
1079
1080- `enable_language_server`
1081- `ensure_final_newline_on_save`
1082- `format_on_save`
1083- `formatter`
1084- `hard_tabs`
1085- `preferred_line_length`
1086- `remove_trailing_whitespace_on_save`
1087- `show_inline_completions`
1088- `show_whitespaces`
1089- `soft_wrap`
1090- `tab_size`
1091- `use_autoclose`
1092- `always_treat_brackets_as_autoclosed`
1093
1094These values take in the same options as the root-level settings with the same name.
1095
1096## Network Proxy
1097
1098- Description: Configure a network proxy for Zed.
1099- Setting: `proxy`
1100- Default: `null`
1101
1102**Options**
1103
1104The proxy setting must contain a URL to the proxy.
1105
1106The following URI schemes are supported:
1107
1108- `http`
1109- `https`
1110- `socks4`
1111- `socks4a`
1112- `socks5`
1113- `socks5h`
1114
1115`http` will be used when no scheme is specified.
1116
1117By default no proxy will be used, or Zed will attempt to retrieve proxy settings from environment variables, such as `http_proxy`, `HTTP_PROXY`, `https_proxy`, `HTTPS_PROXY`, `all_proxy`, `ALL_PROXY`.
1118
1119For example, to set an `http` proxy, add the following to your settings:
1120
1121```json
1122{
1123 "proxy": "http://127.0.0.1:10809"
1124}
1125```
1126
1127Or to set a `socks5` proxy:
1128
1129```json
1130{
1131 "proxy": "socks5://localhost:10808"
1132}
1133```
1134
1135## Preview tabs
1136
1137- Description:
1138 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. \
1139 There are several ways to convert a preview tab into a regular tab:
1140
1141 - Double-clicking on the file
1142 - Double-clicking on the tab header
1143 - Using the `project_panel::OpenPermanent` action
1144 - Editing the file
1145 - Dragging the file to a different pane
1146
1147- Setting: `preview_tabs`
1148- Default:
1149
1150```json
1151"preview_tabs": {
1152 "enabled": true,
1153 "enable_preview_from_file_finder": false,
1154 "enable_preview_from_code_navigation": false,
1155}
1156```
1157
1158### Enable preview from file finder
1159
1160- Description: Determines whether to open files in preview mode when selected from the file finder.
1161- Setting: `enable_preview_from_file_finder`
1162- Default: `false`
1163
1164**Options**
1165
1166`boolean` values
1167
1168### Enable preview from code navigation
1169
1170- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1171- Setting: `enable_preview_from_code_navigation`
1172- Default: `false`
1173
1174**Options**
1175
1176`boolean` values
1177
1178## Preferred Line Length
1179
1180- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1181- Setting: `preferred_line_length`
1182- Default: `80`
1183
1184**Options**
1185
1186`integer` values
1187
1188## Projects Online By Default
1189
1190- Description: Whether or not to show the online projects view by default.
1191- Setting: `projects_online_by_default`
1192- Default: `true`
1193
1194**Options**
1195
1196`boolean` values
1197
1198## Remove Trailing Whitespace On Save
1199
1200- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1201- Setting: `remove_trailing_whitespace_on_save`
1202- Default: `true`
1203
1204**Options**
1205
1206`boolean` values
1207
1208## Search
1209
1210- Description: Search options to enable by default when opening new project and buffer searches.
1211- Setting: `search`
1212- Default:
1213
1214```json
1215"search": {
1216 "whole_word": false,
1217 "case_sensitive": false,
1218 "include_ignored": false,
1219 "regex": false
1220},
1221```
1222
1223## Show Call Status Icon
1224
1225- Description: Whether or not to show the call status icon in the status bar.
1226- Setting: `show_call_status_icon`
1227- Default: `true`
1228
1229**Options**
1230
1231`boolean` values
1232
1233## Show Completions On Input
1234
1235- Description: Whether or not to show completions as you type.
1236- Setting: `show_completions_on_input`
1237- Default: `true`
1238
1239**Options**
1240
1241`boolean` values
1242
1243## Show Completion Documentation
1244
1245- Description: Whether to display inline and alongside documentation for items in the completions menu.
1246- Setting: `show_completion_documentation`
1247- Default: `true`
1248
1249**Options**
1250
1251`boolean` values
1252
1253## Completion Documentation Debounce Delay
1254
1255- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1256- Setting: `completion_documentation_secondary_query_debounce`
1257- Default: `300` ms
1258
1259**Options**
1260
1261`integer` values
1262
1263## Show Inline Completions
1264
1265- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1266- Setting: `show_inline_completions`
1267- Default: `true`
1268
1269**Options**
1270
1271`boolean` values
1272
1273## Show Whitespaces
1274
1275- Description: Whether or not to show render whitespace characters in the editor.
1276- Setting: `show_whitespaces`
1277- Default: `selection`
1278
1279**Options**
1280
12811. `all`
12822. `selection`
12833. `none`
12844. `boundary`
1285
1286## Soft Wrap
1287
1288- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1289- Setting: `soft_wrap`
1290- Default: `prefer_line`
1291
1292**Options**
1293
12941. `none` to stop the soft-wrapping
12952. `prefer_line` to avoid wrapping generally, unless the line is too long
12963. `editor_width` to wrap lines that overflow the editor width
12974. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
1298
1299## Wrap Guides (Vertical Rulers)
1300
1301- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1302- Setting: `wrap_guides`
1303- Default: []
1304
1305**Options**
1306
1307List of `integer` column numbers
1308
1309## Tab Size
1310
1311- Description: The number of spaces to use for each tab character.
1312- Setting: `tab_size`
1313- Default: `4`
1314
1315**Options**
1316
1317`integer` values
1318
1319## Telemetry
1320
1321- Description: Control what info is collected by Zed.
1322- Setting: `telemetry`
1323- Default:
1324
1325```json
1326"telemetry": {
1327 "diagnostics": true,
1328 "metrics": true
1329},
1330```
1331
1332**Options**
1333
1334### Diagnostics
1335
1336- Description: Setting for sending debug-related data, such as crash reports.
1337- Setting: `diagnostics`
1338- Default: `true`
1339
1340**Options**
1341
1342`boolean` values
1343
1344### Metrics
1345
1346- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1347- Setting: `metrics`
1348- Default: `true`
1349
1350**Options**
1351
1352`boolean` values
1353
1354## Terminal
1355
1356- Description: Configuration for the terminal.
1357- Setting: `terminal`
1358- Default:
1359
1360```json
1361{
1362 "terminal": {
1363 "alternate_scroll": "off",
1364 "blinking": "terminal_controlled",
1365 "copy_on_select": false,
1366 "dock": "bottom",
1367 "detect_venv": {
1368 "on": {
1369 "directories": [".env", "env", ".venv", "venv"],
1370 "activate_script": "default"
1371 }
1372 }
1373 "env": {},
1374 "font_family": null,
1375 "font_features": null,
1376 "font_size": null,
1377 "line_height": "comfortable",
1378 "option_as_meta": true,
1379 "button": false,
1380 "shell": {},
1381 "toolbar": {
1382 "title": true
1383 },
1384 "working_directory": "current_project_directory"
1385 }
1386}
1387```
1388
1389### Terminal: Dock
1390
1391- Description: Control the position of the dock
1392- Setting: `dock`
1393- Default: `bottom`
1394
1395**Options**
1396
1397`"bottom"`, `"left"` or `"right"`
1398
1399### Terminal: Alternate Scroll
1400
1401- 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.
1402- Setting: `alternate_scroll`
1403- Default: `off`
1404
1405**Options**
1406
14071. Default alternate scroll mode to on
1408
1409```json
1410{
1411 "terminal": {
1412 "alternate_scroll": "on"
1413 }
1414}
1415```
1416
14172. Default alternate scroll mode to off
1418
1419```json
1420{
1421 "terminal": {
1422 "alternate_scroll": "off"
1423 }
1424}
1425```
1426
1427### Terminal: Blinking
1428
1429- Description: Set the cursor blinking behavior in the terminal
1430- Setting: `blinking`
1431- Default: `terminal_controlled`
1432
1433**Options**
1434
14351. Never blink the cursor, ignore the terminal mode
1436
1437```json
1438{
1439 "terminal": {
1440 "blinking": "off"
1441 }
1442}
1443```
1444
14452. Default the cursor blink to off, but allow the terminal to turn blinking on
1446
1447```json
1448{
1449 "terminal": {
1450 "blinking": "terminal_controlled"
1451 }
1452}
1453```
1454
14553. Always blink the cursor, ignore the terminal mode
1456
1457```json
1458{
1459 "terminal": {
1460 "blinking": "on"
1461 }
1462}
1463```
1464
1465### Terminal: Copy On Select
1466
1467- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1468- Setting: `copy_on_select`
1469- Default: `false`
1470
1471**Options**
1472
1473`boolean` values
1474
1475**Example**
1476
1477```json
1478{
1479 "terminal": {
1480 "copy_on_select": true
1481 }
1482}
1483```
1484
1485### Terminal: Env
1486
1487- 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
1488- Setting: `env`
1489- Default: `{}`
1490
1491**Example**
1492
1493```json
1494{
1495 "terminal": {
1496 "env": {
1497 "ZED": "1",
1498 "KEY": "value1:value2"
1499 }
1500 }
1501}
1502```
1503
1504### Terminal: Font Size
1505
1506- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1507- Setting: `font_size`
1508- Default: `null`
1509
1510**Options**
1511
1512`integer` values
1513
1514```json
1515{
1516 "terminal": {
1517 "font_size": 15
1518 }
1519}
1520```
1521
1522### Terminal: Font Family
1523
1524- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1525- Setting: `font_family`
1526- Default: `null`
1527
1528**Options**
1529
1530The name of any font family installed on the user's system
1531
1532```json
1533{
1534 "terminal": {
1535 "font_family": "Berkeley Mono"
1536 }
1537}
1538```
1539
1540### Terminal: Font Features
1541
1542- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1543- Setting: `font_features`
1544- Default: `null`
1545- Platform: macOS and Windows.
1546
1547**Options**
1548
1549See Buffer Font Features
1550
1551```json
1552{
1553 "terminal": {
1554 "font_features": {
1555 "calt": false
1556 // See Buffer Font Features for more features
1557 }
1558 }
1559}
1560```
1561
1562### Terminal: Line Height
1563
1564- Description: Set the terminal's line height.
1565- Setting: `line_height`
1566- Default: `comfortable`
1567
1568**Options**
1569
15701. Use a line height that's `comfortable` for reading, 1.618. (default)
1571
1572```json
1573{
1574 "terminal": {
1575 "line_height": "comfortable"
1576 }
1577}
1578```
1579
15802. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
1581
1582```json
1583{
1584 "terminal": {
1585 "line_height": "standard"
1586 }
1587}
1588```
1589
15903. Use a custom line height.
1591
1592```json
1593{
1594 "terminal": {
1595 "line_height": {
1596 "custom": 2
1597 }
1598 }
1599}
1600```
1601
1602### Terminal: Option As Meta
1603
1604- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1605- Setting: `option_as_meta`
1606- Default: `true`
1607
1608**Options**
1609
1610`boolean` values
1611
1612```json
1613{
1614 "terminal": {
1615 "option_as_meta": true
1616 }
1617}
1618```
1619
1620### Terminal: Shell
1621
1622- Description: What shell to use when launching the terminal.
1623- Setting: `shell`
1624- Default: `system`
1625
1626**Options**
1627
16281. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1629
1630```json
1631{
1632 "terminal": {
1633 "shell": "system"
1634 }
1635}
1636```
1637
16382. A program to launch:
1639
1640```json
1641{
1642 "terminal": {
1643 "shell": {
1644 "program": "sh"
1645 }
1646 }
1647}
1648```
1649
16503. A program with arguments:
1651
1652```json
1653{
1654 "terminal": {
1655 "shell": {
1656 "with_arguments": {
1657 "program": "/bin/bash",
1658 "args": ["--login"]
1659 }
1660 }
1661 }
1662}
1663```
1664
1665## Terminal: Detect Virtual Environments {#terminal-detect_venv}
1666
1667- Description: Activate the [Python Virtual Environment](https://docs.python.org/3/library/venv.html), if one is found, in the terminal's working directory (as resolved by the working_directory and automatically activating the virtual environemtn
1668- Setting: `detect_venv`
1669- Default:
1670
1671```json
1672{
1673 "terminal":
1674 "detect_venv": {
1675 "on": {
1676 // Default directories to search for virtual environments, relative
1677 // to the current working directory. We recommend overriding this
1678 // in your project's settings, rather than globally.
1679 "directories": [".venv", "venv"],
1680 // Can also be `csh`, `fish`, and `nushell`
1681 "activate_script": "default"
1682 }
1683 }
1684 }
1685}
1686```
1687
1688Disable with:
1689
1690```json
1691{
1692 "terminal":
1693 "detect_venv": "off"
1694 }
1695}
1696```
1697
1698## Terminal: Toolbar
1699
1700- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1701- Setting: `toolbar`
1702- Default:
1703
1704```json
1705{
1706 "terminal": {
1707 "toolbar": {
1708 "title": true
1709 }
1710 }
1711}
1712```
1713
1714**Options**
1715
1716At 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.
1717
1718### Terminal: Button
1719
1720- Description: Control to show or hide the terminal button in the status bar
1721- Setting: `button`
1722- Default: `true`
1723
1724**Options**
1725
1726`boolean` values
1727
1728```json
1729{
1730 "terminal": {
1731 "button": false
1732 }
1733}
1734```
1735
1736### Terminal: Working Directory
1737
1738- Description: What working directory to use when launching the terminal.
1739- Setting: `working_directory`
1740- Default: `"current_project_directory"`
1741
1742**Options**
1743
17441. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1745
1746```json
1747{
1748 "terminal": {
1749 "working_directory": "current_project_directory"
1750 }
1751}
1752```
1753
17542. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1755
1756```json
1757{
1758 "terminal": {
1759 "working_directory": "first_project_directory"
1760 }
1761}
1762```
1763
17643. Always use this platform's home directory (if we can find it)
1765
1766```json
1767{
1768 "terminal": {
1769 "working_directory": "always_home"
1770 }
1771}
1772```
1773
17744. 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.
1775
1776```json
1777{
1778 "terminal": {
1779 "working_directory": {
1780 "always": {
1781 "directory": "~/zed/projects/"
1782 }
1783 }
1784 }
1785}
1786```
1787
1788## Theme
1789
1790- 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.
1791- Setting: `theme`
1792- Default: `One Dark`
1793
1794### Theme Object
1795
1796- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1797- Setting: `theme`
1798- Default:
1799
1800```json
1801"theme": {
1802 "mode": "system",
1803 "dark": "One Dark",
1804 "light": "One Light"
1805},
1806```
1807
1808### Mode
1809
1810- Description: Specify theme mode.
1811- Setting: `mode`
1812- Default: `system`
1813
1814**Options**
1815
18161. Set the theme to dark mode
1817
1818```json
1819{
1820 "mode": "dark"
1821}
1822```
1823
18242. Set the theme to light mode
1825
1826```json
1827{
1828 "mode": "light"
1829}
1830```
1831
18323. Set the theme to system mode
1833
1834```json
1835{
1836 "mode": "system"
1837}
1838```
1839
1840### Dark
1841
1842- Description: The name of the dark Zed theme to use for the UI.
1843- Setting: `dark`
1844- Default: `One Dark`
1845
1846**Options**
1847
1848Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1849
1850### Light
1851
1852- Description: The name of the light Zed theme to use for the UI.
1853- Setting: `light`
1854- Default: `One Light`
1855
1856**Options**
1857
1858Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1859
1860## Vim
1861
1862- Description: Whether or not to enable vim mode (work in progress).
1863- Setting: `vim_mode`
1864- Default: `false`
1865
1866## Project Panel
1867
1868- Description: Customize project panel
1869- Setting: `project_panel`
1870- Default:
1871
1872```json
1873{
1874 "project_panel": {
1875 "button": true,
1876 "default_width": 240,
1877 "dock": "left",
1878 "file_icons": true,
1879 "folder_icons": true,
1880 "git_status": true,
1881 "indent_size": 20,
1882 "auto_reveal_entries": true,
1883 "auto_fold_dirs": true,
1884 "scrollbar": {
1885 "show": "always"
1886 }
1887 }
1888}
1889```
1890
1891### Dock
1892
1893- Description: Control the position of the dock
1894- Setting: `dock`
1895- Default: `left`
1896
1897**Options**
1898
18991. Default dock position to left
1900
1901```json
1902{
1903 "dock": "left"
1904}
1905```
1906
19072. Default dock position to right
1908
1909```json
1910{
1911 "dock": "right"
1912}
1913```
1914
1915### Git Status
1916
1917- Description: Indicates newly created and updated files
1918- Setting: `git_status`
1919- Default: `true`
1920
1921**Options**
1922
19231. Default enable git status
1924
1925```json
1926{
1927 "git_status": true
1928}
1929```
1930
19312. Default disable git status
1932
1933```json
1934{
1935 "git_status": false
1936}
1937```
1938
1939### Default Width
1940
1941- Description: Customize default width taken by project panel
1942- Setting: `default_width`
1943- Default: N/A width in pixels (eg: 420)
1944
1945**Options**
1946
1947`boolean` values
1948
1949### Auto Reveal Entries
1950
1951- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
1952- Setting: `auto_reveal_entries`
1953- Default: `true`
1954
1955**Options**
1956
19571. Enable auto reveal entries
1958
1959```json
1960{
1961 "auto_reveal_entries": true
1962}
1963```
1964
19652. Disable auto reveal entries
1966
1967```json
1968{
1969 "auto_reveal_entries": false
1970}
1971```
1972
1973### Auto Fold Dirs
1974
1975- Description: Whether to fold directories automatically when directory has only one directory inside.
1976- Setting: `auto_fold_dirs`
1977- Default: `true`
1978
1979**Options**
1980
19811. Enable auto fold dirs
1982
1983```json
1984{
1985 "auto_fold_dirs": true
1986}
1987```
1988
19892. Disable auto fold dirs
1990
1991```json
1992{
1993 "auto_fold_dirs": false
1994}
1995```
1996
1997### Indent Size
1998
1999- Description: Amount of indentation (in pixels) for nested items.
2000- Setting: `indent_size`
2001- Default: `20`
2002
2003### Scrollbar
2004
2005- Description: Scrollbar related settings. Possible values: "always", "never".
2006- Setting: `scrollbar`
2007- Default:
2008
2009```json
2010"scrollbar": {
2011 "show": "always"
2012}
2013```
2014
2015**Options**
2016
20171. Show scrollbar in project panel
2018
2019```json
2020{
2021 "scrollbar": {
2022 "show": "always"
2023 }
2024}
2025```
2026
20272. Hide scrollbar in project panel
2028
2029```json
2030{
2031 "scrollbar": {
2032 "show": "never"
2033 }
2034}
2035```
2036
2037## Assistant Panel
2038
2039- Description: Customize assistant panel
2040- Setting: `assistant`
2041- Default:
2042
2043```json
2044"assistant": {
2045 "enabled": true,
2046 "button": true,
2047 "dock": "right",
2048 "default_width": 640,
2049 "default_height": 320,
2050 "provider": "openai",
2051 "version": "1",
2052},
2053```
2054
2055## Outline Panel
2056
2057- Description: Customize outline Panel
2058- Setting: `outline_panel`
2059- Default:
2060
2061```json
2062"outline_panel": {
2063 "button": true,
2064 "default_width": 240,
2065 "dock": "left",
2066 "file_icons": true,
2067 "folder_icons": true,
2068 "git_status": true,
2069 "indent_size": 20,
2070 "auto_reveal_entries": true,
2071 "auto_fold_dirs": true,
2072}
2073```
2074
2075## Calls
2076
2077- Description: Customize behavior when participating in a call
2078- Setting: `calls`
2079- Default:
2080
2081```json
2082"calls": {
2083 // Join calls with the microphone live by default
2084 "mute_on_join": false,
2085 // Share your project when you are the first to join a channel
2086 "share_on_join": false
2087},
2088```
2089
2090## Unnecessary Code Fade
2091
2092- Description: How much to fade out unused code.
2093- Setting: `unnecessary_code_fade`
2094- Default: `0.3`
2095
2096**Options**
2097
2098Float values between `0.0` and `0.9`, where:
2099
2100- `0.0` means no fading (unused code looks the same as used code)
2101- `0.9` means maximum fading (unused code is very faint but still visible)
2102
2103**Example**
2104
2105```json
2106{
2107 "unnecessary_code_fade": 0.5
2108}
2109```
2110
2111## An example configuration:
2112
2113```json
2114// ~/.config/zed/settings.json
2115{
2116 "theme": "cave-light",
2117 "tab_size": 2,
2118 "preferred_line_length": 80,
2119 "soft_wrap": "none",
2120
2121 "buffer_font_size": 18,
2122 "buffer_font_family": "Zed Plex Mono",
2123
2124 "autosave": "on_focus_change",
2125 "format_on_save": "off",
2126 "vim_mode": false,
2127 "projects_online_by_default": true,
2128 "terminal": {
2129 "font_family": "FiraCode Nerd Font Mono",
2130 "blinking": "off"
2131 },
2132 "languages": {
2133 "C": {
2134 "format_on_save": "language_server",
2135 "preferred_line_length": 64,
2136 "soft_wrap": "preferred_line_length"
2137 }
2138 }
2139}
2140```