configuring_zed.md

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