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