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