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 at 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- `inline_completions`
  10- `enable_language_server`
  11- `ensure_final_newline_on_save`
  12- `format_on_save`
  13- `formatter`
  14- `hard_tabs`
  15- `languages`
  16- `preferred_line_length`
  17- `remove_trailing_whitespace_on_save`
  18- `soft_wrap`
  19- `tab_size`
  20- `show_inline_completions`
  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 Plex 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 all OpenType features that can be enabled or disabled for a given buffer or terminal font, as well as setting values for font features.
 114
 115For example, to disable font ligatures, add the following to your settings:
 116
 117```json
 118{
 119  "buffer_font_features": {
 120    "calt": false
 121  }
 122}
 123```
 124
 125You can also set other OpenType features, like setting `cv01` to `7`:
 126
 127```json
 128{
 129  "buffer_font_features": {
 130    "cv01": 7
 131  }
 132}
 133```
 134
 135## Buffer Font Size
 136
 137- Description: The default font size for text in the editor.
 138- Setting: `buffer_font_size`
 139- Default: `15`
 140
 141**Options**
 142
 143`integer` values
 144
 145## Buffer Font Weight
 146
 147- Description: The default font weight for text in the editor.
 148- Setting: `buffer_font_weight`
 149- Default: `400`
 150
 151**Options**
 152
 153`integer` values between `100` and `900`
 154
 155## Buffer Line Height
 156
 157- Description: The default line height for text in the editor.
 158- Setting: `buffer_line_height`
 159- Default: `"comfortable"`
 160
 161**Options**
 162
 163`"standard"`, `"comfortable"` or `{"custom": float}` (`1` is very compact, `2` very loose)
 164
 165## Confirm Quit
 166
 167- Description: Whether or not to prompt the user to confirm before closing the application.
 168- Setting: `confirm_quit`
 169- Default: `false`
 170
 171**Options**
 172
 173`boolean` values
 174
 175## Centered Layout
 176
 177- Description: Configuration for the centered layout mode.
 178- Setting: `centered_layout`
 179- Default:
 180
 181```json
 182"centered_layout": {
 183  "left_padding": 0.2,
 184  "right_padding": 0.2,
 185}
 186```
 187
 188**Options**
 189
 190The `left_padding` and `right_padding` options define the relative width of the
 191left 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`.
 192
 193## Direnv Integration
 194
 195- Description: Settings for [direnv](https://direnv.net/) integration. Requires `direnv` to be installed. `direnv` integration currently only means that the environment variables set by a `direnv` configuration can be used to detect some language servers in `$PATH` instead of installing them.
 196- Setting: `load_direnv`
 197- Default:
 198
 199```json
 200"load_direnv": "shell_hook"
 201```
 202
 203**Options**
 204There are two options to choose from:
 205
 2061. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
 2072. `direct`: Use `direnv export json` to load direnv. This will load direnv directly without relying on the shell hook and might cause some inconsistencies. This allows direnv to work with any shell.
 208
 209## Inline Completions
 210
 211- Description: Settings for inline completions.
 212- Setting: `inline_completions`
 213- Default:
 214
 215```json
 216"inline_completions": {
 217  "disabled_globs": [
 218    ".env"
 219  ]
 220}
 221```
 222
 223**Options**
 224
 225### Disabled Globs
 226
 227- Description: A list of globs representing files that inline completions should be disabled for.
 228- Setting: `disabled_globs`
 229- Default: [".env"]
 230
 231**Options**
 232
 233List of `string` values
 234
 235## Current Line Highlight
 236
 237- Description: How to highlight the current line in the editor.
 238- Setting: `current_line_highlight`
 239- Default: `all`
 240
 241**Options**
 242
 2431. Don't highlight the current line:
 244
 245```json
 246"current_line_highlight": "none"
 247```
 248
 2492. Highlight the gutter area:
 250
 251```json
 252"current_line_highlight": "gutter"
 253```
 254
 2553. Highlight the editor area:
 256
 257```json
 258"current_line_highlight": "line"
 259```
 260
 2614. Highlight the full line:
 262
 263```json
 264"current_line_highlight": "all"
 265```
 266
 267## Cursor Blink
 268
 269- Description: Whether or not the cursor blinks.
 270- Setting: `cursor_blink`
 271- Default: `true`
 272
 273**Options**
 274
 275`boolean` values
 276
 277## Default Dock Anchor
 278
 279- Description: The default anchor for new docks.
 280- Setting: `default_dock_anchor`
 281- Default: `bottom`
 282
 283**Options**
 284
 2851. Position the dock attached to the bottom of the workspace: `bottom`
 2862. Position the dock to the right of the workspace like a side panel: `right`
 2873. Position the dock full screen over the entire workspace: `expanded`
 288
 289## Editor Scrollbar
 290
 291- Description: Whether or not to show the editor scrollbar and various elements in it.
 292- Setting: `scrollbar`
 293- Default:
 294
 295```json
 296"scrollbar": {
 297  "show": "auto",
 298  "cursors": true,
 299  "git_diff": true,
 300  "search_results": true,
 301  "selected_symbol": true,
 302  "diagnostics": true
 303},
 304```
 305
 306### Show Mode
 307
 308- Description: When to show the editor scrollbar.
 309- Setting: `show`
 310- Default: `auto`
 311
 312**Options**
 313
 3141. Show the scrollbar if there's important information or follow the system's configured behavior:
 315
 316```json
 317"scrollbar": {
 318  "show": "auto"
 319}
 320```
 321
 3222. Match the system's configured behavior:
 323
 324```json
 325"scrollbar": {
 326  "show": "system"
 327}
 328```
 329
 3303. Always show the scrollbar:
 331
 332```json
 333"scrollbar": {
 334  "show": "always"
 335}
 336```
 337
 3384. Never show the scrollbar:
 339
 340```json
 341"scrollbar": {
 342  "show": "never"
 343}
 344```
 345
 346### Cursor Indicators
 347
 348- Description: Whether to show cursor positions in the scrollbar.
 349- Setting: `cursors`
 350- Default: `true`
 351
 352**Options**
 353
 354`boolean` values
 355
 356### Git Diff Indicators
 357
 358- Description: Whether to show git diff indicators in the scrollbar.
 359- Setting: `git_diff`
 360- Default: `true`
 361
 362**Options**
 363
 364`boolean` values
 365
 366### Search Results Indicators
 367
 368- Description: Whether to show buffer search results in the scrollbar.
 369- Setting: `search_results`
 370- Default: `true`
 371
 372**Options**
 373
 374`boolean` values
 375
 376### Selected Symbols Indicators
 377
 378- Description: Whether to show selected symbol occurrences in the scrollbar.
 379- Setting: `selected_symbol`
 380- Default: `true`
 381
 382**Options**
 383
 384`boolean` values
 385
 386### Diagnostics
 387
 388- Description: Whether to show diagnostic indicators in the scrollbar.
 389- Setting: `diagnostics`
 390- Default: `true`
 391
 392**Options**
 393
 394`boolean` values
 395
 396## Editor Tab Bar
 397
 398- Description: Settings related to the editor's tab bar.
 399- Settings: `tab_bar`
 400- Default:
 401
 402```json
 403"tab_bar": {
 404  "show": true,
 405  "show_nav_history_buttons": true
 406}
 407```
 408
 409### Show
 410
 411- Description: Whether or not to show the tab bar in the editor.
 412- Setting: `show`
 413- Default: `true`
 414
 415**Options**
 416
 417`boolean` values
 418
 419### Navigation History Buttons
 420
 421- Description: Whether or not to show the navigation history buttons.
 422- Setting: `show_nav_history_buttons`
 423- Default: `true`
 424
 425**Options**
 426
 427`boolean` values
 428
 429## Editor Tabs
 430
 431- Description: Configuration for the editor tabs.
 432- Setting: `tabs`
 433- Default:
 434
 435```json
 436"tabs": {
 437  "close_position": "right",
 438  "file_icons": true,
 439  "git_status": false
 440},
 441```
 442
 443### Close Position
 444
 445- Description: Where to display close button within a tab.
 446- Setting: `close_position`
 447- Default: `right`
 448
 449**Options**
 450
 4511. Display the close button on the right:
 452
 453```json
 454{
 455  "close_position": "right"
 456}
 457```
 458
 4592. Display the close button on the left:
 460
 461```json
 462{
 463  "close_position": "left"
 464}
 465```
 466
 467### File Icons
 468
 469- Description: Whether to show the file icon for a tab.
 470- Setting: `file_icons`
 471- Default: `true`
 472
 473### Git Status
 474
 475- Description: Whether or not to show Git file status in tab.
 476- Setting: `git_status`
 477- Default: `false`
 478
 479## Editor Toolbar
 480
 481- Description: Whether or not to show various elements in the editor toolbar.
 482- Setting: `toolbar`
 483- Default:
 484
 485```json
 486"toolbar": {
 487  "breadcrumbs": true,
 488  "quick_actions": true
 489},
 490```
 491
 492**Options**
 493
 494Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
 495
 496## Enable Language Server
 497
 498- Description: Whether or not to use language servers to provide code intelligence.
 499- Setting: `enable_language_server`
 500- Default: `true`
 501
 502**Options**
 503
 504`boolean` values
 505
 506## Ensure Final Newline On Save
 507
 508- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
 509- Setting: `ensure_final_newline_on_save`
 510- Default: `true`
 511
 512**Options**
 513
 514`boolean` values
 515
 516## LSP
 517
 518- Description: Configuration for language servers.
 519- Setting: `lsp`
 520- Default: `null`
 521
 522**Options**
 523
 524The following settings can be overridden for specific language servers:
 525
 526- `initialization_options`
 527
 528To override settings for a language, add an entry for that language server's name to the `lsp` value. Example:
 529
 530```json
 531"lsp": {
 532  "rust-analyzer": {
 533    "initialization_options": {
 534      "check": {
 535        "command": "clippy" // rust-analyzer.check.command (default: "check")
 536      }
 537    }
 538  }
 539}
 540```
 541
 542## Format On Save
 543
 544- Description: Whether or not to perform a buffer format before saving.
 545- Setting: `format_on_save`
 546- Default: `on`
 547
 548**Options**
 549
 5501. `on`, enables format on save obeying `formatter` setting:
 551
 552```json
 553{
 554  "format_on_save": "on"
 555}
 556```
 557
 5582. `off`, disables format on save:
 559
 560```json
 561{
 562  "format_on_save": "off"
 563}
 564```
 565
 566## Formatter
 567
 568- Description: How to perform a buffer format.
 569- Setting: `formatter`
 570- Default: `auto`
 571
 572**Options**
 573
 5741. To use the current language server, use `"language_server"`:
 575
 576```json
 577{
 578  "formatter": "language_server"
 579}
 580```
 581
 5822. 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):
 583
 584```json
 585{
 586  "formatter": {
 587    "external": {
 588      "command": "sed",
 589      "arguments": ["-e", "s/ *$//"]
 590    }
 591  }
 592}
 593```
 594
 5953. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
 596
 597```json
 598{
 599  "formatter": {
 600    "code_actions": {
 601      // Use ESLint's --fix:
 602      "source.fixAll.eslint": true,
 603      // Organize imports on save:
 604      "source.organizeImports": true
 605    }
 606  }
 607}
 608```
 609
 610## Code Actions On Format
 611
 612- Description: The code actions to perform with the primary language server when formatting the buffer.
 613- Setting: `code_actions_on_format`
 614- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
 615
 616**Examples**
 617
 6181. Organize imports on format in TypeScript and TSX buffers:
 619
 620```json
 621{
 622  "languages": {
 623    "TypeScript": {
 624      "code_actions_on_format": {
 625        "source.organizeImports": true
 626      }
 627    },
 628    "TSX": {
 629      "code_actions_on_format": {
 630        "source.organizeImports": true
 631      }
 632    }
 633  }
 634}
 635```
 636
 6372. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
 638
 639```json
 640{
 641  "languages": {
 642    "JavaScript": {
 643      "code_actions_on_format": {
 644        "source.fixAll.eslint": true
 645      }
 646    }
 647  }
 648}
 649```
 650
 6513. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
 652
 653```json
 654{
 655  "languages": {
 656    "JavaScript": {
 657      "code_actions_on_format": {
 658        "source.fixAll.eslint": true
 659      }
 660    }
 661  },
 662  "lsp": {
 663    "eslint": {
 664      "settings": {
 665        "codeActionOnSave": {
 666          "rules": ["import/order"]
 667        }
 668      }
 669    }
 670  }
 671}
 672```
 673
 674## Auto close
 675
 676- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
 677- Setting: `use_autoclose`
 678- Default: `true`
 679
 680**Options**
 681
 682`boolean` values
 683
 684## Always Treat Brackets As Autoclosed
 685
 686- Description: Controls how the editor handles the autoclosed characters.
 687- Setting: `always_treat_brackets_as_autoclosed`
 688- Default: `false`
 689
 690**Options**
 691
 692`boolean` values
 693
 694**Example**
 695
 696If the setting is set to `true`:
 697
 6981. Enter in the editor: `)))`
 6992. Move the cursor to the start: `^)))`
 7003. Enter again: `)))`
 701
 702The result is still `)))` and not `))))))`, which is what it would be by default.
 703
 704## File Types
 705
 706- Setting: `file_types`
 707- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
 708- Default: `{}`
 709
 710**Examples**
 711
 712To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
 713
 714```json
 715{
 716  "file_types": {
 717    "C++": ["c"],
 718    "TOML": ["MyLockFile"],
 719    "Dockerfile": ["Dockerfile*"]
 720  }
 721}
 722```
 723
 724## Git
 725
 726- Description: Configuration for git-related features.
 727- Setting: `git`
 728- Default:
 729
 730```json
 731{
 732  "git": {
 733    "git_gutter": "tracked_files",
 734    "inline_blame": {
 735      "enabled": true
 736    }
 737  }
 738}
 739```
 740
 741### Git Gutter
 742
 743- Description: Whether or not to show the git gutter.
 744- Setting: `git_gutter`
 745- Default: `tracked_files`
 746
 747**Options**
 748
 7491. Show git gutter in tracked files
 750
 751```json
 752{
 753  "git": {
 754    "git_gutter": "tracked_files"
 755  }
 756}
 757```
 758
 7592. Hide git gutter
 760
 761```json
 762{
 763  "git": {
 764    "git_gutter": "hide"
 765  }
 766}
 767```
 768
 769### Indent Guides
 770
 771- Description: Configuration related to indent guides (requires Zed `0.138.0`). Indent guides can be configured separately for each language.
 772- Setting: `indent_guides`
 773- Default:
 774
 775```json
 776{
 777  "indent_guides": {
 778    "enabled": true,
 779    "line_width": 1,
 780    "active_line_width": 1,
 781    "coloring": "fixed",
 782    "background_coloring": "disabled"
 783  }
 784}
 785```
 786
 787**Options**
 788
 7891. Disable indent guides
 790
 791```json
 792{
 793  "indent_guides": {
 794    "enabled": false
 795  }
 796}
 797```
 798
 7992. Enable indent guides for a specific language.
 800
 801```json
 802{
 803  "languages": {
 804    "Python": {
 805      "indent_guides": {
 806        "enabled": true
 807      }
 808    }
 809  }
 810}
 811```
 812
 8133. Enable indent aware coloring ("rainbow indentation").
 814   The colors that are used for different indentation levels are defined in the theme (theme key: `accents`). They can be customized by using theme overrides.
 815
 816```json
 817{
 818  "indent_guides": {
 819    "enabled": true,
 820    "coloring": "indent_aware"
 821  }
 822}
 823```
 824
 8254. Enable indent aware background coloring ("rainbow indentation").
 826   The colors that are used for different indentation levels are defined in the theme (theme key: `accents`). They can be customized by using theme overrides.
 827
 828```json
 829{
 830  "indent_guides": {
 831    "enabled": true,
 832    "coloring": "indent_aware",
 833    "background_coloring": "indent_aware"
 834  }
 835}
 836```
 837
 838### Inline Git Blame
 839
 840- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
 841- Setting: `inline_blame`
 842- Default:
 843
 844```json
 845{
 846  "git": {
 847    "inline_blame": {
 848      "enabled": true
 849    }
 850  }
 851}
 852```
 853
 854**Options**
 855
 8561. Disable inline git blame:
 857
 858```json
 859{
 860  "git": {
 861    "inline_blame": {
 862      "enabled": false
 863    }
 864  }
 865}
 866```
 867
 8682. Only show inline git blame after a delay (that starts after cursor stops moving):
 869
 870```json
 871{
 872  "git": {
 873    "inline_blame": {
 874      "enabled": false,
 875      "delay_ms": 500
 876    }
 877  }
 878}
 879```
 880
 881## Hard Tabs
 882
 883- Description: Whether to indent lines using tab characters or multiple spaces.
 884- Setting: `hard_tabs`
 885- Default: `false`
 886
 887**Options**
 888
 889`boolean` values
 890
 891## Hover Popover Enabled
 892
 893- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
 894- Setting: `hover_popover_enabled`
 895- Default: `true`
 896
 897**Options**
 898
 899`boolean` values
 900
 901## Inlay hints
 902
 903- Description: Configuration for displaying extra text with hints in the editor.
 904- Setting: `inlay_hints`
 905- Default:
 906
 907```json
 908"inlay_hints": {
 909  "enabled": false,
 910  "show_type_hints": true,
 911  "show_parameter_hints": true,
 912  "show_other_hints": true,
 913  "edit_debounce_ms": 700,
 914  "scroll_debounce_ms": 50
 915}
 916```
 917
 918**Options**
 919
 920Inlay hints querying consists of two parts: editor (client) and LSP server.
 921With 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.
 922At 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.
 923
 924The following languages have inlay hints preconfigured by Zed:
 925
 926- [Go](https://docs.zed.dev/languages/go)
 927- [Rust](https://docs.zed.dev/languages/rust)
 928- [Svelte](https://docs.zed.dev/languages/svelte)
 929- [Typescript](https://docs.zed.dev/languages/typescript)
 930
 931Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
 932
 933Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
 934Settings-related hint updates are not debounced.
 935
 936## Journal
 937
 938- Description: Configuration for the journal.
 939- Setting: `journal`
 940- Default:
 941
 942```json
 943"journal": {
 944  "path": "~",
 945  "hour_format": "hour12"
 946}
 947```
 948
 949### Path
 950
 951- Description: The path of the directory where journal entries are stored.
 952- Setting: `path`
 953- Default: `~`
 954
 955**Options**
 956
 957`string` values
 958
 959### Hour Format
 960
 961- Description: The format to use for displaying hours in the journal.
 962- Setting: `hour_format`
 963- Default: `hour12`
 964
 965**Options**
 966
 9671. 12-hour format:
 968
 969```json
 970{
 971  "hour_format": "hour12"
 972}
 973```
 974
 9752. 24-hour format:
 976
 977```json
 978{
 979  "hour_format": "hour24"
 980}
 981```
 982
 983## Languages
 984
 985- Description: Configuration for specific languages.
 986- Setting: `languages`
 987- Default: `null`
 988
 989**Options**
 990
 991To override settings for a language, add an entry for that languages name to the `languages` value. Example:
 992
 993```json
 994"languages": {
 995  "C": {
 996    "format_on_save": "off",
 997    "preferred_line_length": 64,
 998    "soft_wrap": "preferred_line_length"
 999  },
1000  "JSON": {
1001    "tab_size": 4
1002  }
1003}
1004```
1005
1006The following settings can be overridden for each specific language:
1007
1008- `enable_language_server`
1009- `ensure_final_newline_on_save`
1010- `format_on_save`
1011- `formatter`
1012- `hard_tabs`
1013- `preferred_line_length`
1014- `remove_trailing_whitespace_on_save`
1015- `show_inline_completions`
1016- `show_whitespaces`
1017- `soft_wrap`
1018- `tab_size`
1019- `use_autoclose`
1020- `always_treat_brackets_as_autoclosed`
1021
1022These values take in the same options as the root-level settings with the same name.
1023
1024## Preview tabs
1025
1026- Description:
1027  (requires Zed `0.132.x`) \
1028  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. \
1029   There are several ways to convert a preview tab into a regular tab:
1030
1031  - Double-clicking on the file
1032  - Double-clicking on the tab header
1033  - Using the `project_panel::OpenPermanent` action
1034  - Editing the file
1035  - Dragging the file to a different pane
1036
1037- Setting: `preview_tabs`
1038- Default:
1039
1040```json
1041"preview_tabs": {
1042  "enabled": true,
1043  "enable_preview_from_file_finder": false,
1044  "enable_preview_from_code_navigation": false,
1045}
1046```
1047
1048### Enable preview from file finder
1049
1050- Description: Determines whether to open files in preview mode when selected from the file finder.
1051- Setting: `enable_preview_from_file_finder`
1052- Default: `false`
1053
1054**Options**
1055
1056`boolean` values
1057
1058### Enable preview from code navigation
1059
1060- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab (requires Zed `0.134.x`).
1061- Setting: `enable_preview_from_code_navigation`
1062- Default: `false`
1063
1064**Options**
1065
1066`boolean` values
1067
1068## Preferred Line Length
1069
1070- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1071- Setting: `preferred_line_length`
1072- Default: `80`
1073
1074**Options**
1075
1076`integer` values
1077
1078## Projects Online By Default
1079
1080- Description: Whether or not to show the online projects view by default.
1081- Setting: `projects_online_by_default`
1082- Default: `true`
1083
1084**Options**
1085
1086`boolean` values
1087
1088## Remove Trailing Whitespace On Save
1089
1090- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1091- Setting: `remove_trailing_whitespace_on_save`
1092- Default: `true`
1093
1094**Options**
1095
1096`boolean` values
1097
1098## Show Call Status Icon
1099
1100- Description: Whether or not to show the call status icon in the status bar.
1101- Setting: `show_call_status_icon`
1102- Default: `true`
1103
1104**Options**
1105
1106`boolean` values
1107
1108## Show Completions On Input
1109
1110- Description: Whether or not to show completions as you type.
1111- Setting: `show_completions_on_input`
1112- Default: `true`
1113
1114**Options**
1115
1116`boolean` values
1117
1118## Show Completion Documentation
1119
1120- Description: Whether to display inline and alongside documentation for items in the completions menu.
1121- Setting: `show_completion_documentation`
1122- Default: `true`
1123
1124**Options**
1125
1126`boolean` values
1127
1128## Completion Documentation Debounce Delay
1129
1130- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1131- Setting: `completion_documentation_secondary_query_debounce`
1132- Default: `300` ms
1133
1134**Options**
1135
1136`integer` values
1137
1138## Show Inline Completions
1139
1140- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1141- Setting: `show_inline_completions`
1142- Default: `true`
1143
1144**Options**
1145
1146`boolean` values
1147
1148## Show Whitespaces
1149
1150- Description: Whether or not to show render whitespace characters in the editor.
1151- Setting: `show_whitespaces`
1152- Default: `selection`
1153
1154**Options**
1155
11561. `all`
11572. `selection`
11583. `none`
11594. `boundary`
1160
1161## Soft Wrap
1162
1163- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1164- Setting: `soft_wrap`
1165- Default: `prefer_line`
1166
1167**Options**
1168
11691. `none` to stop the soft-wrapping
11702. `prefer_line` to avoid wrapping generally, unless the line is too long
11713. `editor_width` to wrap lines that overflow the editor width
11724. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
1173
1174## Wrap Guides (Vertical Rulers)
1175
1176- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1177- Setting: `wrap_guides`
1178- Default: []
1179
1180**Options**
1181
1182List of `integer` column numbers
1183
1184## Tab Size
1185
1186- Description: The number of spaces to use for each tab character.
1187- Setting: `tab_size`
1188- Default: `4`
1189
1190**Options**
1191
1192`integer` values
1193
1194## Telemetry
1195
1196- Description: Control what info is collected by Zed.
1197- Setting: `telemetry`
1198- Default:
1199
1200```json
1201"telemetry": {
1202  "diagnostics": true,
1203  "metrics": true
1204},
1205```
1206
1207**Options**
1208
1209### Diagnostics
1210
1211- Description: Setting for sending debug-related data, such as crash reports.
1212- Setting: `diagnostics`
1213- Default: `true`
1214
1215**Options**
1216
1217`boolean` values
1218
1219### Metrics
1220
1221- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1222- Setting: `metrics`
1223- Default: `true`
1224
1225**Options**
1226
1227`boolean` values
1228
1229## Terminal
1230
1231- Description: Configuration for the terminal.
1232- Setting: `terminal`
1233- Default:
1234
1235```json
1236"terminal": {
1237  "alternate_scroll": "off",
1238  "blinking": "terminal_controlled",
1239  "copy_on_select": false,
1240  "env": {},
1241  "font_family": null,
1242  "font_features": null,
1243  "font_size": null,
1244  "option_as_meta": false,
1245  "button": false,
1246  "shell": {},
1247  "toolbar": {
1248    "title": true
1249  },
1250  "working_directory": "current_project_directory"
1251}
1252```
1253
1254### Alternate Scroll
1255
1256- 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.
1257- Setting: `alternate_scroll`
1258- Default: `off`
1259
1260**Options**
1261
12621. Default alternate scroll mode to on
1263
1264```json
1265{
1266  "alternate_scroll": "on"
1267}
1268```
1269
12702. Default alternate scroll mode to off
1271
1272```json
1273{
1274  "alternate_scroll": "off"
1275}
1276```
1277
1278### Blinking
1279
1280- Description: Set the cursor blinking behavior in the terminal
1281- Setting: `blinking`
1282- Default: `terminal_controlled`
1283
1284**Options**
1285
12861. Never blink the cursor, ignore the terminal mode
1287
1288```json
1289{
1290  "blinking": "off"
1291}
1292```
1293
12942. Default the cursor blink to off, but allow the terminal to turn blinking on
1295
1296```json
1297{
1298  "blinking": "terminal_controlled"
1299}
1300```
1301
13023. Always blink the cursor, ignore the terminal mode
1303
1304```json
1305"blinking": "on",
1306```
1307
1308### Copy On Select
1309
1310- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1311- Setting: `copy_on_select`
1312- Default: `false`
1313
1314**Options**
1315
1316`boolean` values
1317
1318### Env
1319
1320- 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
1321- Setting: `env`
1322- Default: `{}`
1323
1324**Example**
1325
1326```json
1327"env": {
1328  "ZED": "1",
1329  "KEY": "value1:value2"
1330}
1331```
1332
1333### Font Size
1334
1335- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1336- Setting: `font_size`
1337- Default: `null`
1338
1339**Options**
1340
1341`integer` values
1342
1343### Font Family
1344
1345- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1346- Setting: `font_family`
1347- Default: `null`
1348
1349**Options**
1350
1351The name of any font family installed on the user's system
1352
1353### Font Features
1354
1355- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1356- Setting: `font_features`
1357- Default: `null`
1358
1359**Options**
1360
1361See Buffer Font Features
1362
1363### Option As Meta
1364
1365- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1366- Setting: `option_as_meta`
1367- Default: `true`
1368
1369**Options**
1370
1371`boolean` values
1372
1373### Shell
1374
1375- Description: What shell to use when launching the terminal.
1376- Setting: `shell`
1377- Default: `system`
1378
1379**Options**
1380
13811. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1382
1383```json
1384{
1385  "shell": "system"
1386}
1387```
1388
13892. A program to launch:
1390
1391```json
1392"shell": {
1393    "program": "sh"
1394}
1395```
1396
13973. A program with arguments:
1398
1399```json
1400"shell": {
1401  "with_arguments": {
1402    "program": "/bin/bash",
1403    "args": ["--login"]
1404  }
1405}
1406```
1407
1408## Terminal Toolbar
1409
1410- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
1411- Setting: `toolbar`
1412- Default:
1413
1414```json
1415"toolbar": {
1416  "title": true,
1417},
1418```
1419
1420**Options**
1421
1422At 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.
1423
1424### Terminal Button
1425
1426- Description: Control to show or hide the terminal button in the status bar
1427- Setting: `button`
1428- Default: `true`
1429
1430**Options**
1431
1432`boolean` values
1433
1434### Working Directory
1435
1436- Description: What working directory to use when launching the terminal.
1437- Setting: `working_directory`
1438- Default: `"current_project_directory"`
1439
1440**Options**
1441
14421. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
1443
1444```json
1445{
1446  "working_directory": "current_project_directory"
1447}
1448```
1449
14502. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
1451
1452```json
1453{
1454  "working_directory": "first_project_directory"
1455}
1456```
1457
14583. Always use this platform's home directory (if we can find it)
1459
1460```json
1461{
1462  "working_directory": "always_home"
1463}
1464```
1465
14664. 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.
1467
1468```json
1469"working_directory": {
1470  "always": {
1471    "directory": "~/zed/projects/"
1472  }
1473}
1474```
1475
1476## Theme
1477
1478- 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.
1479- Setting: `theme`
1480- Default: `One Dark`
1481
1482### Theme Object
1483
1484- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
1485- Setting: `theme`
1486- Default:
1487
1488```json
1489"theme": {
1490  "mode": "system",
1491  "dark": "One Dark",
1492  "light": "One Light"
1493},
1494```
1495
1496### Mode
1497
1498- Description: Specify theme mode.
1499- Setting: `mode`
1500- Default: `system`
1501
1502**Options**
1503
15041. Set the theme to dark mode
1505
1506```json
1507{
1508  "mode": "dark"
1509}
1510```
1511
15122. Set the theme to light mode
1513
1514```json
1515{
1516  "mode": "light"
1517}
1518```
1519
15203. Set the theme to system mode
1521
1522```json
1523{
1524  "mode": "system"
1525}
1526```
1527
1528### Dark
1529
1530- Description: The name of the dark Zed theme to use for the UI.
1531- Setting: `dark`
1532- Default: `One Dark`
1533
1534**Options**
1535
1536Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1537
1538### Light
1539
1540- Description: The name of the light Zed theme to use for the UI.
1541- Setting: `light`
1542- Default: `One Light`
1543
1544**Options**
1545
1546Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
1547
1548## Vim
1549
1550- Description: Whether or not to enable vim mode (work in progress).
1551- Setting: `vim_mode`
1552- Default: `false`
1553
1554## Project Panel
1555
1556- Description: Customise project panel
1557- Setting: `project_panel`
1558- Default:
1559
1560```json
1561"project_panel": {
1562  "button": true,
1563  "dock": "left",
1564  "git_status": true,
1565  "default_width": "N/A - width in pixels"
1566},
1567```
1568
1569### Dock
1570
1571- Description: Control the position of the dock
1572- Setting: `dock`
1573- Default: `left`
1574
1575**Options**
1576
15771. Default dock position to left
1578
1579```json
1580{
1581  "dock": "left"
1582}
1583```
1584
15852. Default dock position to right
1586
1587```json
1588{
1589  "dock": "right"
1590}
1591```
1592
1593### Git Status
1594
1595- Description: Indicates newly created and updated files
1596- Setting: `git_status`
1597- Default: `true`
1598
15991. Default enable git status
1600
1601```json
1602{
1603  "git_status": true
1604}
1605```
1606
16072. Default disable git status
1608
1609```json
1610{
1611  "git_status": false
1612}
1613```
1614
1615### Default Width
1616
1617- Description: Customise default width taken by project panel
1618- Setting: `default_width`
1619- Default: N/A width in pixels (eg: 420)
1620
1621**Options**
1622
1623`boolean` values
1624
1625## Calls
1626
1627- Description: Customise behaviour when participating in a call
1628- Setting: `calls`
1629- Default:
1630
1631```json
1632"calls": {
1633  // Join calls with the microphone live by default
1634  "mute_on_join": false,
1635  // Share your project when you are the first to join a channel
1636  "share_on_join": false
1637},
1638```
1639
1640## An example configuration:
1641
1642```json
1643// ~/.config/zed/settings.json
1644{
1645  "theme": "cave-light",
1646  "tab_size": 2,
1647  "preferred_line_length": 80,
1648  "soft_wrap": "none",
1649
1650  "buffer_font_size": 18,
1651  "buffer_font_family": "Zed Plex Mono",
1652
1653  "autosave": "on_focus_change",
1654  "format_on_save": "off",
1655  "vim_mode": false,
1656  "projects_online_by_default": true,
1657  "terminal": {
1658    "font_family": "FiraCode Nerd Font Mono",
1659    "blinking": "off"
1660  },
1661  "languages": {
1662    "C": {
1663      "format_on_save": "language_server",
1664      "preferred_line_length": 64,
1665      "soft_wrap": "preferred_line_length"
1666    }
1667  }
1668}
1669```