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- `language_overrides`
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## Copilot
146
147- Description: Copilot-specific settings.
148- Setting: `copilot`
149- Default:
150
151```json
152"copilot": {
153 "disabled_globs": [
154 ".env"
155 ]
156}
157```
158
159**Options**
160
161### Disabled Globs
162
163- Description: The set of glob patterns for which Copilot should be disabled in any matching file.
164- Setting: `disabled_globs`
165- Default: [".env"]
166
167**Options**
168
169List of `string` values
170
171## Cursor Blink
172
173- Description: Whether or not the cursor blinks.
174- Setting: `cursor_blink`
175- Default: `true`
176
177**Options**
178
179`boolean` values
180
181## Default Dock Anchor
182
183- Description: The default anchor for new docks.
184- Setting: `default_dock_anchor`
185- Default: `bottom`
186
187**Options**
188
1891. Position the dock attached to the bottom of the workspace: `bottom`
1902. Position the dock to the right of the workspace like a side panel: `right`
1913. Position the dock full screen over the entire workspace: `expanded`
192
193## Editor Scrollbar
194
195- Description: Whether or not to show the editor scrollbar and various elements in it.
196- Setting: `scrollbar`
197- Default:
198
199```json
200"scrollbar": {
201 "show": "auto",
202 "git_diff": true,
203 "search_results": true,
204 "selected_symbol": true,
205 "diagnostics": true
206},
207```
208
209### Show Mode
210
211- Description: When to show the editor scrollbar.
212- Setting: `show`
213- Default: `auto`
214
215**Options**
216
2171. Show the scrollbar if there's important information or follow the system's configured behavior:
218
219```json
220"scrollbar": {
221 "show": "auto"
222}
223```
224
2252. Match the system's configured behavior:
226
227```json
228"scrollbar": {
229 "show": "system"
230}
231```
232
2333. Always show the scrollbar:
234
235```json
236"scrollbar": {
237 "show": "always"
238}
239```
240
2414. Never show the scrollbar:
242
243```json
244"scrollbar": {
245 "show": "never"
246}
247```
248
249### Git Diff Indicators
250
251- Description: Whether to show git diff indicators in the scrollbar.
252- Setting: `git_diff`
253- Default: `true`
254
255**Options**
256
257`boolean` values
258
259### Search Results Indicators
260
261- Description: Whether to show buffer search results in the scrollbar.
262- Setting: `search_results`
263- Default: `true`
264
265**Options**
266
267`boolean` values
268
269### Selected Symbols Indicators
270
271- Description: Whether to show selected symbol occurrences in the scrollbar.
272- Setting: `selected_symbol`
273- Default: `true`
274
275**Options**
276
277`boolean` values
278
279### Diagnostics
280
281- Description: Whether to show diagnostic indicators in the scrollbar.
282- Setting: `diagnostics`
283- Default: `true`
284
285**Options**
286
287`boolean` values
288
289## Editor Toolbar
290
291- Description: Whether or not to show various elements in the editor toolbar.
292- Setting: `toolbar`
293- Default:
294
295```json
296"toolbar": {
297 "breadcrumbs": true,
298 "quick_actions": true
299},
300```
301
302**Options**
303
304Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
305
306## Enable Language Server
307
308- Description: Whether or not to use language servers to provide code intelligence.
309- Setting: `enable_language_server`
310- Default: `true`
311
312**Options**
313
314`boolean` values
315
316## Ensure Final Newline On Save
317
318- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
319- Setting: `ensure_final_newline_on_save`
320- Default: `true`
321
322**Options**
323
324`boolean` values
325
326## LSP
327
328- Description: Configuration for language servers.
329- Setting: `lsp`
330- Default: `null`
331
332**Options**
333
334The following settings can be overridden for specific language servers:
335
336- `initialization_options`
337
338To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
339
340```json
341"lsp": {
342 "rust-analyzer": {
343 "initialization_options": {
344 "check": {
345 "command": "clippy" // rust-analyzer.check.command (default: "check")
346 }
347 }
348 }
349}
350```
351
352## Format On Save
353
354- Description: Whether or not to perform a buffer format before saving.
355- Setting: `format_on_save`
356- Default: `on`
357
358**Options**
359
3601. `on`, enables format on save obeying `formatter` setting:
361
362```json
363{
364 "format_on_save": "on"
365}
366```
367
3682. `off`, disables format on save:
369
370```json
371{
372 "format_on_save": "off"
373}
374```
375
376## Formatter
377
378- Description: How to perform a buffer format.
379- Setting: `formatter`
380- Default: `language_server`
381
382**Options**
383
3841. To use the current language server, use `"language_server"`:
385
386```json
387{
388 "formatter": "language_server"
389}
390```
391
3922. 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):
393
394```json
395{
396 "formatter": {
397 "external": {
398 "command": "sed",
399 "arguments": ["-e", "s/ *$//"]
400 }
401 }
402}
403```
404
4053. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
406
407```json
408{
409 "formatter": {
410 "code_actions": {
411 // Use ESLint's --fix:
412 "source.fixAll.eslint": true,
413 // Organize imports on save:
414 "source.organizeImports": true
415 }
416 }
417}
418```
419
420## Code Actions On Format
421
422- Description: The code actions to perform with the primary language server when formatting the buffer.
423- Setting: `code_actions_on_format`
424- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
425
426**Examples**
427
4281. Organize imports on format in TypeScript and TSX buffers:
429
430```json
431{
432 "languages": {
433 "TypeScript": {
434 "code_actions_on_format": {
435 "source.organizeImports": true
436 }
437 },
438 "TSX": {
439 "code_actions_on_format": {
440 "source.organizeImports": true
441 }
442 }
443 }
444}
445```
446
4472. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
448
449```json
450{
451 "languages": {
452 "JavaScript": {
453 "code_actions_on_format": {
454 "source.fixAll.eslint": true
455 }
456 }
457 }
458}
459```
460
4613. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
462
463```json
464{
465 "languages": {
466 "JavaScript": {
467 "code_actions_on_format": {
468 "source.fixAll.eslint": true
469 }
470 }
471 },
472 "lsp": {
473 "eslint": {
474 "settings": {
475 "codeActionOnSave": {
476 "rules": ["import/order"]
477 }
478 }
479 }
480 }
481}
482```
483
484## Auto close
485
486- Description: Whether or not to automatically type closing characters for you.
487- Setting: `use_autoclose`
488- Default: `true`
489
490**Options**
491
492`boolean` values
493
494## Always Treat Brackets As Autoclosed
495
496- Description: Controls how the editor handles the autoclosed characters.
497- Setting: `always_treat_brackets_as_autoclosed`
498- Default: `false`
499
500**Options**
501
502`boolean` values
503
504**Example**
505
506If the setting is set to `true`:
507
5081. Enter in the editor: `)))`
5092. Move the cursor to the start: `^)))`
5103. Enter again: `)))`
511
512The result is still `)))` and not `))))))`, which is what it would be by default.
513
514## File Types
515
516- Setting: `file_types`
517- Description: Configure how Zed selects a language for a file based on its filename or extension.
518- Default: `{}`
519
520**Examples**
521
522To interpret all `.c` files as C++, and files called `MyLockFile` as TOML:
523
524```json
525{
526 "file_types": {
527 "C++": ["c"],
528 "TOML": ["MyLockFile"]
529 }
530}
531```
532
533## Git
534
535- Description: Configuration for git-related features.
536- Setting: `git`
537- Default:
538
539```json
540"git": {
541 "git_gutter": "tracked_files"
542},
543```
544
545### Git Gutter
546
547- Description: Whether or not to show the git gutter.
548- Setting: `git_gutter`
549- Default: `tracked_files`
550
551**Options**
552
5531. Show git gutter in tracked files
554
555```json
556{
557 "git_gutter": "tracked_files"
558}
559```
560
5612. Hide git gutter
562
563```json
564{
565 "git_gutter": "hide"
566}
567```
568
569## Hard Tabs
570
571- Description: Whether to indent lines using tab characters or multiple spaces.
572- Setting: `hard_tabs`
573- Default: `false`
574
575**Options**
576
577`boolean` values
578
579## Hover Popover Enabled
580
581- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
582- Setting: `hover_popover_enabled`
583- Default: `true`
584
585**Options**
586
587`boolean` values
588
589## Inlay hints
590
591- Description: Configuration for displaying extra text with hints in the editor.
592- Setting: `inlay_hints`
593- Default:
594
595```json
596"inlay_hints": {
597 "enabled": false,
598 "show_type_hints": true,
599 "show_parameter_hints": true,
600 "show_other_hints": true,
601 "edit_debounce_ms": 700,
602 "scroll_debounce_ms": 50
603}
604```
605
606**Options**
607
608Inlay hints querying consists of two parts: editor (client) and LSP server.
609With 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.
610At 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.
611
612The following languages have inlay hints preconfigured by Zed:
613
614- [Go](https://docs.zed.dev/languages/go)
615- [Rust](https://docs.zed.dev/languages/rust)
616- [Svelte](https://docs.zed.dev/languages/svelte)
617- [Typescript](https://docs.zed.dev/languages/typescript)
618
619Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
620
621Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
622Settings-related hint updates are not debounced.
623
624## Journal
625
626- Description: Configuration for the journal.
627- Setting: `journal`
628- Default:
629
630```json
631"journal": {
632 "path": "~",
633 "hour_format": "hour12"
634}
635```
636
637### Path
638
639- Description: The path of the directory where journal entries are stored.
640- Setting: `path`
641- Default: `~`
642
643**Options**
644
645`string` values
646
647### Hour Format
648
649- Description: The format to use for displaying hours in the journal.
650- Setting: `hour_format`
651- Default: `hour12`
652
653**Options**
654
6551. 12-hour format:
656
657```json
658{
659 "hour_format": "hour12"
660}
661```
662
6632. 24-hour format:
664
665```json
666{
667 "hour_format": "hour24"
668}
669```
670
671## Language Overrides
672
673- Description: Configuration overrides for specific languages.
674- Setting: `language_overrides`
675- Default: `null`
676
677**Options**
678
679To override settings for a language, add an entry for that languages name to the `language_overrides` value. Example:
680
681```json
682"language_overrides": {
683 "C": {
684 "format_on_save": "off",
685 "preferred_line_length": 64,
686 "soft_wrap": "preferred_line_length"
687 },
688 "JSON": {
689 "tab_size": 4
690 }
691}
692```
693
694The following settings can be overridden for each specific language:
695
696- `enable_language_server`
697- `ensure_final_newline_on_save`
698- `format_on_save`
699- `formatter`
700- `hard_tabs`
701- `preferred_line_length`
702- `remove_trailing_whitespace_on_save`
703- `show_copilot_suggestions`
704- `show_whitespaces`
705- `soft_wrap`
706- `tab_size`
707- `use_autoclose`
708- `always_treat_brackets_as_autoclosed`
709
710These values take in the same options as the root-level settings with the same name.
711
712## Preview tabs
713
714- Description:
715 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. \
716 There are several ways to convert a preview tab into a regular tab:
717
718 - Double-clicking on the file
719 - Double-clicking on the tab header
720 - Using the 'project_panel::OpenPermanent' action
721 - Editing the file
722 - Dragging the file to a different pane
723
724- Setting: `preview_tabs`
725- Default:
726
727```json
728"preview_tabs": {
729 "enabled": true,
730 "enable_preview_from_file_finder": false
731}
732```
733
734**Options**
735
736### Enable preview from file finder
737
738- Description: Determines whether to open files in preview mode when selected from the file finder.
739- Setting: `enable_preview_from_file_finder`
740- Default: `false`
741
742**Options**
743
744`boolean` values
745
746## Preferred Line Length
747
748- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
749- Setting: `preferred_line_length`
750- Default: `80`
751
752**Options**
753
754`integer` values
755
756## Projects Online By Default
757
758- Description: Whether or not to show the online projects view by default.
759- Setting: `projects_online_by_default`
760- Default: `true`
761
762**Options**
763
764`boolean` values
765
766## Remove Trailing Whitespace On Save
767
768- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
769- Setting: `remove_trailing_whitespace_on_save`
770- Default: `true`
771
772**Options**
773
774`boolean` values
775
776## Show Call Status Icon
777
778- Description: Whether or not to show the call status icon in the status bar.
779- Setting: `show_call_status_icon`
780- Default: `true`
781
782**Options**
783
784`boolean` values
785
786## Show Completions On Input
787
788- Description: Whether or not to show completions as you type.
789- Setting: `show_completions_on_input`
790- Default: `true`
791
792**Options**
793
794`boolean` values
795
796## Show Completion Documentation
797
798- Description: Whether to display inline and alongside documentation for items in the completions menu.
799- Setting: `show_completion_documentation`
800- Default: `true`
801
802**Options**
803
804`boolean` values
805
806## Completion Documentation Debounce Delay
807
808- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
809- Setting: `completion_documentation_secondary_query_debounce`
810- Default: `300` ms
811
812**Options**
813
814`integer` values
815
816## Show Copilot Suggestions
817
818- Description: Whether or not to show Copilot suggestions as you type or wait for a `copilot::Toggle`.
819- Setting: `show_copilot_suggestions`
820- Default: `true`
821
822**Options**
823
824`boolean` values
825
826## Show Whitespaces
827
828- Description: Whether or not to show render whitespace characters in the editor.
829- Setting: `show_whitespaces`
830- Default: `selection`
831
832**Options**
833
8341. `all`
8352. `selection`
8363. `none`
837
838## Soft Wrap
839
840- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
841- Setting: `soft_wrap`
842- Default: `none`
843
844**Options**
845
8461. `editor_width`
8472. `preferred_line_length`
8483. `none`
849
850## Tab Size
851
852- Description: The number of spaces to use for each tab character.
853- Setting: `tab_size`
854- Default: `4`
855
856**Options**
857
858`integer` values
859
860## Telemetry
861
862- Description: Control what info is collected by Zed.
863- Setting: `telemetry`
864- Default:
865
866```json
867"telemetry": {
868 "diagnostics": true,
869 "metrics": true
870},
871```
872
873**Options**
874
875### Diagnostics
876
877- Description: Setting for sending debug-related data, such as crash reports.
878- Setting: `diagnostics`
879- Default: `true`
880
881**Options**
882
883`boolean` values
884
885### Metrics
886
887- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
888- Setting: `metrics`
889- Default: `true`
890
891**Options**
892
893`boolean` values
894
895## Terminal
896
897- Description: Configuration for the terminal.
898- Setting: `terminal`
899- Default:
900
901```json
902"terminal": {
903 "alternate_scroll": "off",
904 "blinking": "terminal_controlled",
905 "copy_on_select": false,
906 "env": {},
907 "font_family": null,
908 "font_features": null,
909 "font_size": null,
910 "option_as_meta": false,
911 "shell": {},
912 "toolbar": {
913 "title": true
914 },
915 "working_directory": "current_project_directory"
916}
917```
918
919### Alternate Scroll
920
921- 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.
922- Setting: `alternate_scroll`
923- Default: `off`
924
925**Options**
926
9271. Default alternate scroll mode to on
928
929```json
930{
931 "alternate_scroll": "on"
932}
933```
934
9352. Default alternate scroll mode to off
936
937```json
938{
939 "alternate_scroll": "off"
940}
941```
942
943### Blinking
944
945- Description: Set the cursor blinking behavior in the terminal
946- Setting: `blinking`
947- Default: `terminal_controlled`
948
949**Options**
950
9511. Never blink the cursor, ignore the terminal mode
952
953```json
954{
955 "blinking": "off"
956}
957```
958
9592. Default the cursor blink to off, but allow the terminal to turn blinking on
960
961```json
962{
963 "blinking": "terminal_controlled"
964}
965```
966
9673. Always blink the cursor, ignore the terminal mode
968
969```json
970"blinking": "on",
971```
972
973### Copy On Select
974
975- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
976- Setting: `copy_on_select`
977- Default: `false`
978
979**Options**
980
981`boolean` values
982
983### Env
984
985- 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
986- Setting: `env`
987- Default: `{}`
988
989**Example**
990
991```json
992"env": {
993 "ZED": "1",
994 "KEY": "value1:value2"
995}
996```
997
998### Font Size
999
1000- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1001- Setting: `font_size`
1002- Default: `null`
1003
1004**Options**
1005
1006`integer` values
1007
1008### Font Family
1009
1010- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1011- Setting: `font_family`
1012- Default: `null`
1013
1014**Options**
1015
1016The name of any font family installed on the user's system
1017
1018### Font Features
1019
1020- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1021- Setting: `font_features`
1022- Default: `null`
1023
1024**Options**
1025
1026See Buffer Font Features
1027
1028### Option As Meta
1029
1030- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1031- Setting: `option_as_meta`
1032- Default: `true`
1033
1034**Options**
1035
1036`boolean` values
1037
1038### Shell
1039
1040- Description: What shell to use when launching the terminal.
1041- Setting: `shell`
1042- Default: `system`
1043
1044**Options**
1045
10461. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1047
1048```json
1049{
1050 "shell": "system"
1051}
1052```
1053
10542. A program to launch:
1055
1056```json
1057"shell": {
1058 "program": "sh"
1059}
1060```
1061
10623. A program with arguments:
1063
1064```json
1065"shell": {
1066 "with_arguments": {
1067 "program": "/bin/bash",
1068 "args": ["--login"]
1069 }
1070}
1071```
1072
1073## Terminal Toolbar
1074
1075- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1076- Setting: `toolbar`
1077- Default:
1078
1079```json
1080"toolbar": {
1081 "title": true,
1082},
1083```
1084
1085**Options**
1086
1087At 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.
1088
1089### Working Directory
1090
1091- Description: What working directory to use when launching the terminal.
1092- Setting: `working_directory`
1093- Default: `"current_project_directory"`
1094
1095**Options**
1096
10971. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1098
1099```json
1100{
1101 "working_directory": "current_project_directory"
1102}
1103```
1104
11052. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1106
1107```json
1108{
1109 "working_directory": "first_project_directory"
1110}
1111```
1112
11133. Always use this platform's home directory (if we can find it)
1114
1115```json
1116{
1117 "working_directory": "always_home"
1118}
1119```
1120
11214. 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.
1122
1123```json
1124"working_directory": {
1125 "always": {
1126 "directory": "~/zed/projects/"
1127 }
1128}
1129```
1130
1131## Theme
1132
1133- 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.
1134- Setting: `theme`
1135- Default: `One Dark`
1136
1137### Theme Object
1138
1139- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1140- Setting: `theme`
1141- Default:
1142
1143```json
1144"theme": {
1145 "mode": "dark",
1146 "dark": "One Dark",
1147 "light": "One Light"
1148},
1149```
1150
1151### Mode
1152
1153- Description: Specify theme mode.
1154- Setting: `mode`
1155- Default: `dark`
1156
1157**Options**
1158
11591. Set the theme to dark mode
1160
1161```json
1162{
1163 "mode": "dark"
1164}
1165```
1166
11672. Set the theme to light mode
1168
1169```json
1170{
1171 "mode": "light"
1172}
1173```
1174
11753. Set the theme to system mode
1176
1177```json
1178{
1179 "mode": "system"
1180}
1181```
1182
1183### Dark
1184
1185- Description: The name of the dark Zed theme to use for the UI.
1186- Setting: `dark`
1187- Default: `One Dark`
1188
1189**Options**
1190
1191Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1192
1193### Light
1194
1195- Description: The name of the light Zed theme to use for the UI.
1196- Setting: `light`
1197- Default: `One Light`
1198
1199**Options**
1200
1201Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1202
1203## Vim
1204
1205- Description: Whether or not to enable vim mode (work in progress).
1206- Setting: `vim_mode`
1207- Default: `false`
1208
1209## Project Panel
1210
1211- Description: Customise project panel
1212- Setting: `project_panel`
1213- Default:
1214
1215```json
1216"project_panel": {
1217 "dock": "left",
1218 "git_status": true,
1219 "default_width": "N/A - width in pixels"
1220},
1221```
1222
1223### Dock
1224
1225- Description: Control the position of the dock
1226- Setting: `dock`
1227- Default: `left`
1228
1229**Options**
1230
12311. Default dock position to left
1232
1233```json
1234{
1235 "dock": "left"
1236}
1237```
1238
12392. Default dock position to right
1240
1241```json
1242{
1243 "dock": "right"
1244}
1245```
1246
1247### Git Status
1248
1249- Description: Indicates newly created and updated files
1250- Setting: `git_status`
1251- Default: `true`
1252
12531. Default enable git status
1254
1255```json
1256{
1257 "git_status": true
1258}
1259```
1260
12612. Default disable git status
1262
1263```json
1264{
1265 "git_status": false
1266}
1267```
1268
1269### Default Width
1270
1271- Description: Customise default width taken by project panel
1272- Setting: `default_width`
1273- Default: N/A width in pixels (eg: 420)
1274
1275**Options**
1276
1277`boolean` values
1278
1279## An example configuration:
1280
1281```json
1282// ~/.config/zed/settings.json
1283{
1284 "theme": "cave-light",
1285 "tab_size": 2,
1286 "preferred_line_length": 80,
1287 "soft_wrap": "none",
1288
1289 "buffer_font_size": 18,
1290 "buffer_font_family": "Zed Mono",
1291
1292 "autosave": "on_focus_change",
1293 "format_on_save": "off",
1294 "vim_mode": false,
1295 "projects_online_by_default": true,
1296 "terminal": {
1297 "font_family": "FiraCode Nerd Font Mono",
1298 "blinking": "off"
1299 },
1300 "language_overrides": {
1301 "C": {
1302 "format_on_save": "language_server",
1303 "preferred_line_length": 64,
1304 "soft_wrap": "preferred_line_length"
1305 }
1306 }
1307}
1308```