configuring-zed.md

   1# Configuring Zed
   2
   3Zed is designed to be configured: we want to fit your workflow and preferences exactly. We provide default settings that are designed to be a comfortable starting point for as many people as possible, but we hope you will enjoy tweaking it to make it feel incredible.
   4
   5In addition to the settings described here, you may also want to change your [theme](./themes.md), configure your [key bindings](./key-bindings.md), set up [tasks](./tasks.md) or install [extensions](https://github.com/zed-industries/extensions).
   6
   7## Settings files
   8
   9<!--
  10TBD: Settings files. Rewrite with "remote settings" in mind (e.g. `local settings` on the remote host).
  11Consider renaming `zed: Open Local Settings` to `zed: Open Project Settings`.
  12
  13TBD: Add settings documentation about how settings are merged as overlays. E.g. project>local>default. Note how settings that are maps are merged, but settings that are arrays are replaced and must include the defaults.
  14-->
  15
  16Your settings file can be opened with {#kb zed::OpenSettings}. By default it is located at `~/.config/zed/settings.json`, though if you have XDG_CONFIG_HOME in your environment on Linux it will be at `$XDG_CONFIG_HOME/zed/settings.json` instead.
  17
  18This configuration is merged with any local configuration inside your projects. You can open the project settings by running {#action zed::OpenProjectSettings} from the command palette. This will create a `.zed` directory containing`.zed/settings.json`.
  19
  20Although most projects will only need one settings file at the root, you can add more local settings files for subdirectories as needed. Not all settings can be set in local files, just those that impact the behavior of the editor and language tooling. For example you can set `tab_size`, `formatter` etc. but not `theme`, `vim_mode` and similar.
  21
  22The syntax for configuration files is a super-set of JSON that allows `//` comments.
  23
  24## Default settings
  25
  26You can find the default settings for your current Zed by running {#action zed::OpenDefaultSettings} from the command palette.
  27
  28Extensions that provide language servers may also provide default settings for those language servers.
  29
  30# Settings
  31
  32## Active Pane Modifiers
  33
  34Styling settings applied to the active pane.
  35
  36### Magnification
  37
  38- 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.
  39- Setting: `magnification`
  40- Default: `1.0`
  41
  42### Border size
  43
  44- Description: Size of the border surrounding the active pane. When set to 0, the active pane doesn't have any border. The border is drawn inset.
  45- Setting: `border_size`
  46- Default: `0.0`
  47
  48### Inactive Opacity
  49
  50- Description: Opacity of inactive panels. When set to 1.0, the inactive panes have the same opacity as the active one. If set to 0, the inactive panes content will not be visible at all. Values are clamped to the [0.0, 1.0] range.
  51- Setting: `inactive_opacity`
  52- Default: `1.0`
  53
  54**Options**
  55
  56`float` values
  57
  58## Auto Install extensions
  59
  60- Description: Define extensions to be autoinstalled or never be installed.
  61- Setting: `auto_install_extension`
  62- Default: `{"html": true}`
  63
  64**Options**
  65
  66You can find the names of your currently installed extensions by listing the subfolders under the [extension installation location](./extensions/installing-extensions#installation-location):
  67
  68On MacOS:
  69
  70```sh
  71ls ~/Library/Application\ Support/Zed/extensions/installed/
  72```
  73
  74On Linux:
  75
  76```sh
  77ls ~/.local/share/zed/extensions/installed
  78```
  79
  80Define extensions which should be installed (`true`) or never installed (`false`).
  81
  82```json
  83{
  84  "auto_install_extensions": {
  85    "html": true,
  86    "dockerfile": true,
  87    "docker-compose": false
  88  }
  89}
  90```
  91
  92## Autosave
  93
  94- Description: When to automatically save edited buffers.
  95- Setting: `autosave`
  96- Default: `off`
  97
  98**Options**
  99
 1001. To disable autosave, set it to `off`:
 101
 102```json
 103{
 104  "autosave": "off"
 105}
 106```
 107
 1082. To autosave when focus changes, use `on_focus_change`:
 109
 110```json
 111{
 112  "autosave": "on_focus_change"
 113}
 114```
 115
 1163. To autosave when the active window changes, use `on_window_change`:
 117
 118```json
 119{
 120  "autosave": "on_window_change"
 121}
 122```
 123
 1244. To autosave after an inactivity period, use `after_delay`:
 125
 126```json
 127{
 128  "autosave": {
 129    "after_delay": {
 130      "milliseconds": 1000
 131    }
 132  }
 133}
 134```
 135
 136## Autoscroll on Clicks
 137
 138- Description: Whether to scroll when clicking near the edge of the visible text area.
 139- Setting: `autoscroll_on_clicks`
 140- Default: `false`
 141
 142**Options**
 143
 144`boolean` values
 145
 146## Auto Update
 147
 148- Description: Whether or not to automatically check for updates.
 149- Setting: `auto_update`
 150- Default: `true`
 151
 152**Options**
 153
 154`boolean` values
 155
 156## Base Keymap
 157
 158- Description: Base key bindings scheme. Base keymaps can be overridden with user keymaps.
 159- Setting: `base_keymap`
 160- Default: `VSCode`
 161
 162**Options**
 163
 1641. VSCode
 165
 166```json
 167{
 168  "base_keymap": "VSCode"
 169}
 170```
 171
 1722. Atom
 173
 174```json
 175{
 176  "base_keymap": "Atom"
 177}
 178```
 179
 1803. JetBrains
 181
 182```json
 183{
 184  "base_keymap": "JetBrains"
 185}
 186```
 187
 1884. None
 189
 190```json
 191{
 192  "base_keymap": "None"
 193}
 194```
 195
 1965. SublimeText
 197
 198```json
 199{
 200  "base_keymap": "SublimeText"
 201}
 202```
 203
 2046. TextMate
 205
 206```json
 207{
 208  "base_keymap": "TextMate"
 209}
 210```
 211
 212## Buffer Font Family
 213
 214- Description: The name of a font to use for rendering text in the editor.
 215- Setting: `buffer_font_family`
 216- Default: `Zed Plex Mono`
 217
 218**Options**
 219
 220The name of any font family installed on the user's system
 221
 222## Buffer Font Features
 223
 224- Description: The OpenType features to enable for text in the editor.
 225- Setting: `buffer_font_features`
 226- Default: `null`
 227- Platform: macOS and Windows.
 228
 229**Options**
 230
 231Zed 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.
 232
 233For example, to disable font ligatures, add the following to your settings:
 234
 235```json
 236{
 237  "buffer_font_features": {
 238    "calt": false
 239  }
 240}
 241```
 242
 243You can also set other OpenType features, like setting `cv01` to `7`:
 244
 245```json
 246{
 247  "buffer_font_features": {
 248    "cv01": 7
 249  }
 250}
 251```
 252
 253## Buffer Font Fallbacks
 254
 255- Description: Set the buffer text's font fallbacks, this will be merged with the platform's default fallbacks.
 256- Setting: `buffer_font_fallbacks`
 257- Default: `null`
 258- Platform: macOS and Windows.
 259
 260**Options**
 261
 262For example, to use `Nerd Font` as a fallback, add the following to your settings:
 263
 264```json
 265{
 266  "buffer_font_fallbacks": ["Nerd Font"]
 267}
 268```
 269
 270## Buffer Font Size
 271
 272- Description: The default font size for text in the editor.
 273- Setting: `buffer_font_size`
 274- Default: `15`
 275
 276**Options**
 277
 278`integer` values from `6` to `100` pixels (inclusive)
 279
 280## Buffer Font Weight
 281
 282- Description: The default font weight for text in the editor.
 283- Setting: `buffer_font_weight`
 284- Default: `400`
 285
 286**Options**
 287
 288`integer` values between `100` and `900`
 289
 290## Buffer Line Height
 291
 292- Description: The default line height for text in the editor.
 293- Setting: `buffer_line_height`
 294- Default: `"comfortable"`
 295
 296**Options**
 297
 298`"standard"`, `"comfortable"` or `{"custom": float}` (`1` is very compact, `2` very loose)
 299
 300## Confirm Quit
 301
 302- Description: Whether or not to prompt the user to confirm before closing the application.
 303- Setting: `confirm_quit`
 304- Default: `false`
 305
 306**Options**
 307
 308`boolean` values
 309
 310## Centered Layout
 311
 312- Description: Configuration for the centered layout mode.
 313- Setting: `centered_layout`
 314- Default:
 315
 316```json
 317"centered_layout": {
 318  "left_padding": 0.2,
 319  "right_padding": 0.2,
 320}
 321```
 322
 323**Options**
 324
 325The `left_padding` and `right_padding` options define the relative width of the
 326left 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`.
 327
 328## Direnv Integration
 329
 330- Description: Settings for [direnv](https://direnv.net/) integration. Requires `direnv` to be installed.
 331  `direnv` integration make it possible to use the environment variables set by a `direnv` configuration to detect some language servers in `$PATH` instead of installing them.
 332  It also allows for those environment variables to be used in tasks.
 333- Setting: `load_direnv`
 334- Default:
 335
 336```json
 337"load_direnv": "direct"
 338```
 339
 340**Options**
 341There are two options to choose from:
 342
 3431. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
 3442. `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.
 345
 346## Inline Completions
 347
 348- Description: Settings for inline completions.
 349- Setting: `inline_completions`
 350- Default:
 351
 352```json
 353"inline_completions": {
 354  "disabled_globs": [
 355    ".env"
 356  ]
 357}
 358```
 359
 360**Options**
 361
 362### Disabled Globs
 363
 364- Description: A list of globs representing files that inline completions should be disabled for.
 365- Setting: `disabled_globs`
 366- Default: `[".env"]`
 367
 368**Options**
 369
 370List of `string` values
 371
 372## Inline Completions Disabled in
 373
 374- Description: A list of language scopes in which inline completions should be disabled.
 375- Setting: `inline_completions_disabled_in`
 376- Default: `[]`
 377
 378**Options**
 379
 380List of `string` values
 381
 3821. Don't show inline completions in comments:
 383
 384```json
 385"disabled_in": ["comment"]
 386```
 387
 3882. Don't show inline completions in strings and comments:
 389
 390```json
 391"disabled_in": ["comment", "string"]
 392```
 393
 3943. Only in Go, don't show inline completions in strings and comments:
 395
 396```json
 397{
 398  "languages": {
 399    "Go": {
 400      "inline_completions_disabled_in": ["comment", "string"]
 401    }
 402  }
 403}
 404```
 405
 406## Current Line Highlight
 407
 408- Description: How to highlight the current line in the editor.
 409- Setting: `current_line_highlight`
 410- Default: `all`
 411
 412**Options**
 413
 4141. Don't highlight the current line:
 415
 416```json
 417"current_line_highlight": "none"
 418```
 419
 4202. Highlight the gutter area:
 421
 422```json
 423"current_line_highlight": "gutter"
 424```
 425
 4263. Highlight the editor area:
 427
 428```json
 429"current_line_highlight": "line"
 430```
 431
 4324. Highlight the full line:
 433
 434```json
 435"current_line_highlight": "all"
 436```
 437
 438## Cursor Blink
 439
 440- Description: Whether or not the cursor blinks.
 441- Setting: `cursor_blink`
 442- Default: `true`
 443
 444**Options**
 445
 446`boolean` values
 447
 448## Cursor Shape
 449
 450- Description: Cursor shape for the default editor.
 451- Setting: `cursor_shape`
 452- Default: `bar`
 453
 454**Options**
 455
 4561. A vertical bar:
 457
 458```json
 459"cursor_shape": "bar"
 460```
 461
 4622. A block that surrounds the following character:
 463
 464```json
 465"cursor_shape": "block"
 466```
 467
 4683. An underline / underscore that runs along the following character:
 469
 470```json
 471"cursor_shape": "underline"
 472```
 473
 4744. An box drawn around the following character:
 475
 476```json
 477"cursor_shape": "hollow"
 478```
 479
 480**Options**
 481
 4821. Position the dock attached to the bottom of the workspace: `bottom`
 4832. Position the dock to the right of the workspace like a side panel: `right`
 4843. Position the dock full screen over the entire workspace: `expanded`
 485
 486## Editor Scrollbar
 487
 488- Description: Whether or not to show the editor scrollbar and various elements in it.
 489- Setting: `scrollbar`
 490- Default:
 491
 492```json
 493"scrollbar": {
 494  "show": "auto",
 495  "cursors": true,
 496  "git_diff": true,
 497  "search_results": true,
 498  "selected_symbol": true,
 499  "diagnostics": true
 500},
 501```
 502
 503### Show Mode
 504
 505- Description: When to show the editor scrollbar.
 506- Setting: `show`
 507- Default: `auto`
 508
 509**Options**
 510
 5111. Show the scrollbar if there's important information or follow the system's configured behavior:
 512
 513```json
 514"scrollbar": {
 515  "show": "auto"
 516}
 517```
 518
 5192. Match the system's configured behavior:
 520
 521```json
 522"scrollbar": {
 523  "show": "system"
 524}
 525```
 526
 5273. Always show the scrollbar:
 528
 529```json
 530"scrollbar": {
 531  "show": "always"
 532}
 533```
 534
 5354. Never show the scrollbar:
 536
 537```json
 538"scrollbar": {
 539  "show": "never"
 540}
 541```
 542
 543### Cursor Indicators
 544
 545- Description: Whether to show cursor positions in the scrollbar.
 546- Setting: `cursors`
 547- Default: `true`
 548
 549**Options**
 550
 551`boolean` values
 552
 553### Git Diff Indicators
 554
 555- Description: Whether to show git diff indicators in the scrollbar.
 556- Setting: `git_diff`
 557- Default: `true`
 558
 559**Options**
 560
 561`boolean` values
 562
 563### Search Results Indicators
 564
 565- Description: Whether to show buffer search results in the scrollbar.
 566- Setting: `search_results`
 567- Default: `true`
 568
 569**Options**
 570
 571`boolean` values
 572
 573### Selected Symbols Indicators
 574
 575- Description: Whether to show selected symbol occurrences in the scrollbar.
 576- Setting: `selected_symbol`
 577- Default: `true`
 578
 579**Options**
 580
 581`boolean` values
 582
 583### Diagnostics
 584
 585- Description: Whether to show diagnostic indicators in the scrollbar.
 586- Setting: `diagnostics`
 587- Default: `true`
 588
 589**Options**
 590
 591`boolean` values
 592
 593## Editor Tab Bar
 594
 595- Description: Settings related to the editor's tab bar.
 596- Settings: `tab_bar`
 597- Default:
 598
 599```json
 600"tab_bar": {
 601  "show": true,
 602  "show_nav_history_buttons": true
 603}
 604```
 605
 606### Show
 607
 608- Description: Whether or not to show the tab bar in the editor.
 609- Setting: `show`
 610- Default: `true`
 611
 612**Options**
 613
 614`boolean` values
 615
 616### Navigation History Buttons
 617
 618- Description: Whether or not to show the navigation history buttons.
 619- Setting: `show_nav_history_buttons`
 620- Default: `true`
 621
 622**Options**
 623
 624`boolean` values
 625
 626## Editor Tabs
 627
 628- Description: Configuration for the editor tabs.
 629- Setting: `tabs`
 630- Default:
 631
 632```json
 633"tabs": {
 634  "close_position": "right",
 635  "file_icons": false,
 636  "git_status": false,
 637  "activate_on_close": "history"
 638},
 639```
 640
 641### Close Position
 642
 643- Description: Where to display close button within a tab.
 644- Setting: `close_position`
 645- Default: `right`
 646
 647**Options**
 648
 6491. Display the close button on the right:
 650
 651```json
 652{
 653  "close_position": "right"
 654}
 655```
 656
 6572. Display the close button on the left:
 658
 659```json
 660{
 661  "close_position": "left"
 662}
 663```
 664
 665### File Icons
 666
 667- Description: Whether to show the file icon for a tab.
 668- Setting: `file_icons`
 669- Default: `false`
 670
 671### Git Status
 672
 673- Description: Whether or not to show Git file status in tab.
 674- Setting: `git_status`
 675- Default: `false`
 676
 677### Activate on close
 678
 679- Description: What to do after closing the current tab.
 680- Setting: `activate_on_close`
 681- Default: `history`
 682
 683**Options**
 684
 6851.  Activate the tab that was open previously:
 686
 687```json
 688{
 689  "activate_on_close": "history"
 690}
 691```
 692
 6932. Activate the neighbour tab (prefers the right one, if present):
 694
 695```json
 696{
 697  "activate_on_close": "neighbour"
 698}
 699```
 700
 701## Editor Toolbar
 702
 703- Description: Whether or not to show various elements in the editor toolbar.
 704- Setting: `toolbar`
 705- Default:
 706
 707```json
 708"toolbar": {
 709  "breadcrumbs": true,
 710  "quick_actions": true
 711},
 712```
 713
 714**Options**
 715
 716Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
 717
 718## Enable Language Server
 719
 720- Description: Whether or not to use language servers to provide code intelligence.
 721- Setting: `enable_language_server`
 722- Default: `true`
 723
 724**Options**
 725
 726`boolean` values
 727
 728## Ensure Final Newline On Save
 729
 730- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
 731- Setting: `ensure_final_newline_on_save`
 732- Default: `true`
 733
 734**Options**
 735
 736`boolean` values
 737
 738## LSP
 739
 740- Description: Configuration for language servers.
 741- Setting: `lsp`
 742- Default: `null`
 743
 744**Options**
 745
 746The following settings can be overridden for specific language servers:
 747
 748- `initialization_options`
 749- `settings`
 750
 751To override configuration for a language server, add an entry for that language server's name to the `lsp` value.
 752
 753Some options are passed via `initialization_options` to the language server. These are for options which must be specified at language server startup and when changed will require restarting the language server.
 754
 755For example to pass the `check` option to `rust-analyzer`, use the following configuration:
 756
 757```json
 758"lsp": {
 759  "rust-analyzer": {
 760    "initialization_options": {
 761      "check": {
 762        "command": "clippy" // rust-analyzer.check.command (default: "check")
 763      }
 764    }
 765  }
 766}
 767```
 768
 769While other options may be changed at a runtime and should be placed under `settings`:
 770
 771```json
 772"lsp": {
 773  "yaml-language-server": {
 774    "settings": {
 775      "yaml": {
 776        "keyOrdering": true // Enforces alphabetical ordering of keys in maps
 777      }
 778    }
 779  }
 780}
 781```
 782
 783## Format On Save
 784
 785- Description: Whether or not to perform a buffer format before saving.
 786- Setting: `format_on_save`
 787- Default: `on`
 788
 789**Options**
 790
 7911. `on`, enables format on save obeying `formatter` setting:
 792
 793```json
 794{
 795  "format_on_save": "on"
 796}
 797```
 798
 7992. `off`, disables format on save:
 800
 801```json
 802{
 803  "format_on_save": "off"
 804}
 805```
 806
 807## Formatter
 808
 809- Description: How to perform a buffer format.
 810- Setting: `formatter`
 811- Default: `auto`
 812
 813**Options**
 814
 8151. To use the current language server, use `"language_server"`:
 816
 817```json
 818{
 819  "formatter": "language_server"
 820}
 821```
 822
 8232. 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):
 824
 825```json
 826{
 827  "formatter": {
 828    "external": {
 829      "command": "sed",
 830      "arguments": ["-e", "s/ *$//"]
 831    }
 832  }
 833}
 834```
 835
 8363. External formatters may optionally include a `{buffer_path}` placeholder which at runtime will include the path of the buffer being formatted. Formatters operate by receiving file content via standard input, reformatting it and then outputting it to standard output and so normally don't know the filename of what they are formatting. Tools like prettier support receiving the file path via a command line argument which can then used to impact formatting decisions.
 837
 838WARNING: `{buffer_path}` should not be used to direct your formatter to read from a filename. Your formatter should only read from standard input and should not read or write files directly.
 839
 840```json
 841  "formatter": {
 842    "external": {
 843      "command": "prettier",
 844      "arguments": ["--stdin-filepath", "{buffer_path}"]
 845    }
 846  }
 847```
 848
 8494. Or to use code actions provided by the connected language servers, use `"code_actions"`:
 850
 851```json
 852{
 853  "formatter": {
 854    "code_actions": {
 855      // Use ESLint's --fix:
 856      "source.fixAll.eslint": true,
 857      // Organize imports on save:
 858      "source.organizeImports": true
 859    }
 860  }
 861}
 862```
 863
 8645. Or to use multiple formatters consecutively, use an array of formatters:
 865
 866```json
 867{
 868  "formatter": [
 869    {"language_server": {"name": "rust-analyzer"}},
 870    {"external": {
 871      "command": "sed",
 872      "arguments": ["-e", "s/ *$//"]
 873    }
 874  ]
 875}
 876```
 877
 878Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
 879If any of the formatters fails, the subsequent ones will still be executed.
 880
 881## Code Actions On Format
 882
 883- Description: The code actions to perform with the primary language server when formatting the buffer.
 884- Setting: `code_actions_on_format`
 885- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
 886
 887**Examples**
 888
 889<!--
 890TBD: Add Python Ruff source.organizeImports example
 891-->
 892
 8931. Organize imports on format in TypeScript and TSX buffers:
 894
 895```json
 896{
 897  "languages": {
 898    "TypeScript": {
 899      "code_actions_on_format": {
 900        "source.organizeImports": true
 901      }
 902    },
 903    "TSX": {
 904      "code_actions_on_format": {
 905        "source.organizeImports": true
 906      }
 907    }
 908  }
 909}
 910```
 911
 9122. Run ESLint `fixAll` code action when formatting:
 913
 914```json
 915{
 916  "languages": {
 917    "JavaScript": {
 918      "code_actions_on_format": {
 919        "source.fixAll.eslint": true
 920      }
 921    }
 922  }
 923}
 924```
 925
 9263. Run only a single ESLint rule when using `fixAll`:
 927
 928```json
 929{
 930  "languages": {
 931    "JavaScript": {
 932      "code_actions_on_format": {
 933        "source.fixAll.eslint": true
 934      }
 935    }
 936  },
 937  "lsp": {
 938    "eslint": {
 939      "settings": {
 940        "codeActionOnSave": {
 941          "rules": ["import/order"]
 942        }
 943      }
 944    }
 945  }
 946}
 947```
 948
 949## Auto close
 950
 951- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
 952- Setting: `use_autoclose`
 953- Default: `true`
 954
 955**Options**
 956
 957`boolean` values
 958
 959## Always Treat Brackets As Autoclosed
 960
 961- Description: Controls how the editor handles the autoclosed characters.
 962- Setting: `always_treat_brackets_as_autoclosed`
 963- Default: `false`
 964
 965**Options**
 966
 967`boolean` values
 968
 969**Example**
 970
 971If the setting is set to `true`:
 972
 9731. Enter in the editor: `)))`
 9742. Move the cursor to the start: `^)))`
 9753. Enter again: `)))`
 976
 977The result is still `)))` and not `))))))`, which is what it would be by default.
 978
 979## File Scan Exclusions
 980
 981- Setting: `file_scan_exclusions`
 982- Description: Configure how Add filename or directory globs that will be excluded by Zed entirely. They will be skipped during file scans, file searches and hidden from project file tree.
 983- Default:
 984
 985```json
 986"file_scan_exclusions": [
 987  "**/.git",
 988  "**/.svn",
 989  "**/.hg",
 990  "**/CVS",
 991  "**/.DS_Store",
 992  "**/Thumbs.db",
 993  "**/.classpath",
 994  "**/.settings"
 995],
 996```
 997
 998Note, specifying `file_scan_exclusions` in settings.json will override the defaults (shown above). If you are looking to exclude additional items you will need to include all the default values in your settings.
 999
1000## File Types
1001
1002- Setting: `file_types`
1003- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
1004- Default: `{}`
1005
1006**Examples**
1007
1008To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
1009
1010```json
1011{
1012  "file_types": {
1013    "C++": ["c"],
1014    "TOML": ["MyLockFile"],
1015    "Dockerfile": ["Dockerfile*"]
1016  }
1017}
1018```
1019
1020## Git
1021
1022- Description: Configuration for git-related features.
1023- Setting: `git`
1024- Default:
1025
1026```json
1027{
1028  "git": {
1029    "git_gutter": "tracked_files",
1030    "inline_blame": {
1031      "enabled": true
1032    }
1033  }
1034}
1035```
1036
1037### Git Gutter
1038
1039- Description: Whether or not to show the git gutter.
1040- Setting: `git_gutter`
1041- Default: `tracked_files`
1042
1043**Options**
1044
10451. Show git gutter in tracked files
1046
1047```json
1048{
1049  "git": {
1050    "git_gutter": "tracked_files"
1051  }
1052}
1053```
1054
10552. Hide git gutter
1056
1057```json
1058{
1059  "git": {
1060    "git_gutter": "hide"
1061  }
1062}
1063```
1064
1065### Inline Git Blame
1066
1067- Description: Whether or not to show git blame information inline, on the currently focused line.
1068- Setting: `inline_blame`
1069- Default:
1070
1071```json
1072{
1073  "git": {
1074    "inline_blame": {
1075      "enabled": true
1076    }
1077  }
1078}
1079```
1080
1081**Options**
1082
10831. Disable inline git blame:
1084
1085```json
1086{
1087  "git": {
1088    "inline_blame": {
1089      "enabled": false
1090    }
1091  }
1092}
1093```
1094
10952. Only show inline git blame after a delay (that starts after cursor stops moving):
1096
1097```json
1098{
1099  "git": {
1100    "inline_blame": {
1101      "enabled": true,
1102      "delay_ms": 500
1103    }
1104  }
1105}
1106```
1107
11083. Show a commit summary next to the commit date and author:
1109
1110```json
1111{
1112  "git": {
1113    "inline_blame": {
1114      "enabled": true,
1115      "show_commit_summary": true
1116    }
1117  }
1118}
1119```
1120
11214. Use this as the minimum column at which to display inline blame information:
1122
1123```json
1124{
1125  "git": {
1126    "inline_blame": {
1127      "enabled": true,
1128      "min_column": 80
1129    }
1130  }
1131}
1132```
1133
1134## Indent Guides
1135
1136- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1137- Setting: `indent_guides`
1138- Default:
1139
1140```json
1141{
1142  "indent_guides": {
1143    "enabled": true,
1144    "line_width": 1,
1145    "active_line_width": 1,
1146    "coloring": "fixed",
1147    "background_coloring": "disabled"
1148  }
1149}
1150```
1151
1152**Options**
1153
11541. Disable indent guides
1155
1156```json
1157{
1158  "indent_guides": {
1159    "enabled": false
1160  }
1161}
1162```
1163
11642. Enable indent guides for a specific language.
1165
1166```json
1167{
1168  "languages": {
1169    "Python": {
1170      "indent_guides": {
1171        "enabled": true
1172      }
1173    }
1174  }
1175}
1176```
1177
11783. Enable indent aware coloring ("rainbow indentation").
1179   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.
1180
1181```json
1182{
1183  "indent_guides": {
1184    "enabled": true,
1185    "coloring": "indent_aware"
1186  }
1187}
1188```
1189
11904. Enable indent aware background coloring ("rainbow indentation").
1191   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.
1192
1193```json
1194{
1195  "indent_guides": {
1196    "enabled": true,
1197    "coloring": "indent_aware",
1198    "background_coloring": "indent_aware"
1199  }
1200}
1201```
1202
1203## Hard Tabs
1204
1205- Description: Whether to indent lines using tab characters or multiple spaces.
1206- Setting: `hard_tabs`
1207- Default: `false`
1208
1209**Options**
1210
1211`boolean` values
1212
1213## Hover Popover Enabled
1214
1215- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1216- Setting: `hover_popover_enabled`
1217- Default: `true`
1218
1219**Options**
1220
1221`boolean` values
1222
1223## Inlay hints
1224
1225- Description: Configuration for displaying extra text with hints in the editor.
1226- Setting: `inlay_hints`
1227- Default:
1228
1229```json
1230"inlay_hints": {
1231  "enabled": false,
1232  "show_type_hints": true,
1233  "show_parameter_hints": true,
1234  "show_other_hints": true,
1235  "show_background": false,
1236  "edit_debounce_ms": 700,
1237  "scroll_debounce_ms": 50
1238}
1239```
1240
1241**Options**
1242
1243Inlay hints querying consists of two parts: editor (client) and LSP server.
1244With 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.
1245At 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.
1246
1247The following languages have inlay hints preconfigured by Zed:
1248
1249- [Go](https://docs.zed.dev/languages/go)
1250- [Rust](https://docs.zed.dev/languages/rust)
1251- [Svelte](https://docs.zed.dev/languages/svelte)
1252- [Typescript](https://docs.zed.dev/languages/typescript)
1253
1254Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
1255
1256Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
1257Settings-related hint updates are not debounced.
1258
1259## Journal
1260
1261- Description: Configuration for the journal.
1262- Setting: `journal`
1263- Default:
1264
1265```json
1266"journal": {
1267  "path": "~",
1268  "hour_format": "hour12"
1269}
1270```
1271
1272### Path
1273
1274- Description: The path of the directory where journal entries are stored.
1275- Setting: `path`
1276- Default: `~`
1277
1278**Options**
1279
1280`string` values
1281
1282### Hour Format
1283
1284- Description: The format to use for displaying hours in the journal.
1285- Setting: `hour_format`
1286- Default: `hour12`
1287
1288**Options**
1289
12901. 12-hour format:
1291
1292```json
1293{
1294  "hour_format": "hour12"
1295}
1296```
1297
12982. 24-hour format:
1299
1300```json
1301{
1302  "hour_format": "hour24"
1303}
1304```
1305
1306## Languages
1307
1308- Description: Configuration for specific languages.
1309- Setting: `languages`
1310- Default: `null`
1311
1312**Options**
1313
1314To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1315
1316```json
1317"languages": {
1318  "C": {
1319    "format_on_save": "off",
1320    "preferred_line_length": 64,
1321    "soft_wrap": "preferred_line_length"
1322  },
1323  "JSON": {
1324    "tab_size": 4
1325  }
1326}
1327```
1328
1329The following settings can be overridden for each specific language:
1330
1331- `enable_language_server`
1332- `ensure_final_newline_on_save`
1333- `format_on_save`
1334- `formatter`
1335- `hard_tabs`
1336- `preferred_line_length`
1337- `remove_trailing_whitespace_on_save`
1338- `show_inline_completions`
1339- `show_whitespaces`
1340- `soft_wrap`
1341- `tab_size`
1342- `use_autoclose`
1343- `always_treat_brackets_as_autoclosed`
1344
1345These values take in the same options as the root-level settings with the same name.
1346
1347## Network Proxy
1348
1349- Description: Configure a network proxy for Zed.
1350- Setting: `proxy`
1351- Default: `null`
1352
1353**Options**
1354
1355The proxy setting must contain a URL to the proxy.
1356
1357The following URI schemes are supported:
1358
1359- `http`
1360- `https`
1361- `socks4` - SOCKS4 proxy with local DNS
1362- `socks4a` - SOCKS4 proxy with remote DNS
1363- `socks5` - SOCKS5 proxy with local DNS
1364- `socks5h` - SOCKS5 proxy with remote DNS
1365
1366`http` will be used when no scheme is specified.
1367
1368By default no proxy will be used, or Zed will attempt to retrieve proxy settings from environment variables, such as `http_proxy`, `HTTP_PROXY`, `https_proxy`, `HTTPS_PROXY`, `all_proxy`, `ALL_PROXY`.
1369
1370For example, to set an `http` proxy, add the following to your settings:
1371
1372```json
1373{
1374  "proxy": "http://127.0.0.1:10809"
1375}
1376```
1377
1378Or to set a `socks5` proxy:
1379
1380```json
1381{
1382  "proxy": "socks5h://localhost:10808"
1383}
1384```
1385
1386## Preview tabs
1387
1388- Description:
1389  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. \
1390   There are several ways to convert a preview tab into a regular tab:
1391
1392  - Double-clicking on the file
1393  - Double-clicking on the tab header
1394  - Using the `project_panel::OpenPermanent` action
1395  - Editing the file
1396  - Dragging the file to a different pane
1397
1398- Setting: `preview_tabs`
1399- Default:
1400
1401```json
1402"preview_tabs": {
1403  "enabled": true,
1404  "enable_preview_from_file_finder": false,
1405  "enable_preview_from_code_navigation": false,
1406}
1407```
1408
1409### Enable preview from file finder
1410
1411- Description: Determines whether to open files in preview mode when selected from the file finder.
1412- Setting: `enable_preview_from_file_finder`
1413- Default: `false`
1414
1415**Options**
1416
1417`boolean` values
1418
1419### Enable preview from code navigation
1420
1421- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1422- Setting: `enable_preview_from_code_navigation`
1423- Default: `false`
1424
1425**Options**
1426
1427`boolean` values
1428
1429## File Finder
1430
1431### Modal Max Width
1432
1433- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
1434- Setting: `max_modal_width`
1435- Default: `small`
1436
1437## Preferred Line Length
1438
1439- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1440- Setting: `preferred_line_length`
1441- Default: `80`
1442
1443**Options**
1444
1445`integer` values
1446
1447## Projects Online By Default
1448
1449- Description: Whether or not to show the online projects view by default.
1450- Setting: `projects_online_by_default`
1451- Default: `true`
1452
1453**Options**
1454
1455`boolean` values
1456
1457## Remove Trailing Whitespace On Save
1458
1459- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1460- Setting: `remove_trailing_whitespace_on_save`
1461- Default: `true`
1462
1463**Options**
1464
1465`boolean` values
1466
1467## Search
1468
1469- Description: Search options to enable by default when opening new project and buffer searches.
1470- Setting: `search`
1471- Default:
1472
1473```json
1474"search": {
1475  "whole_word": false,
1476  "case_sensitive": false,
1477  "include_ignored": false,
1478  "regex": false
1479},
1480```
1481
1482## Show Call Status Icon
1483
1484- Description: Whether or not to show the call status icon in the status bar.
1485- Setting: `show_call_status_icon`
1486- Default: `true`
1487
1488**Options**
1489
1490`boolean` values
1491
1492## Show Completions On Input
1493
1494- Description: Whether or not to show completions as you type.
1495- Setting: `show_completions_on_input`
1496- Default: `true`
1497
1498**Options**
1499
1500`boolean` values
1501
1502## Show Completion Documentation
1503
1504- Description: Whether to display inline and alongside documentation for items in the completions menu.
1505- Setting: `show_completion_documentation`
1506- Default: `true`
1507
1508**Options**
1509
1510`boolean` values
1511
1512## Completion Documentation Debounce Delay
1513
1514- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1515- Setting: `completion_documentation_secondary_query_debounce`
1516- Default: `300` ms
1517
1518**Options**
1519
1520`integer` values
1521
1522## Show Inline Completions
1523
1524- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1525- Setting: `show_inline_completions`
1526- Default: `true`
1527
1528**Options**
1529
1530`boolean` values
1531
1532## Show Whitespaces
1533
1534- Description: Whether or not to show render whitespace characters in the editor.
1535- Setting: `show_whitespaces`
1536- Default: `selection`
1537
1538**Options**
1539
15401. `all`
15412. `selection`
15423. `none`
15434. `boundary`
1544
1545## Soft Wrap
1546
1547- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1548- Setting: `soft_wrap`
1549- Default: `none`
1550
1551**Options**
1552
15531. `none` to avoid wrapping generally, unless the line is too long
15542. `prefer_line` (deprecated, same as `none`)
15553. `editor_width` to wrap lines that overflow the editor width
15564. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
1557
1558## Wrap Guides (Vertical Rulers)
1559
1560- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1561- Setting: `wrap_guides`
1562- Default: []
1563
1564**Options**
1565
1566List of `integer` column numbers
1567
1568## Tab Size
1569
1570- Description: The number of spaces to use for each tab character.
1571- Setting: `tab_size`
1572- Default: `4`
1573
1574**Options**
1575
1576`integer` values
1577
1578## Telemetry
1579
1580- Description: Control what info is collected by Zed.
1581- Setting: `telemetry`
1582- Default:
1583
1584```json
1585"telemetry": {
1586  "diagnostics": true,
1587  "metrics": true
1588},
1589```
1590
1591**Options**
1592
1593### Diagnostics
1594
1595- Description: Setting for sending debug-related data, such as crash reports.
1596- Setting: `diagnostics`
1597- Default: `true`
1598
1599**Options**
1600
1601`boolean` values
1602
1603### Metrics
1604
1605- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1606- Setting: `metrics`
1607- Default: `true`
1608
1609**Options**
1610
1611`boolean` values
1612
1613## Terminal
1614
1615- Description: Configuration for the terminal.
1616- Setting: `terminal`
1617- Default:
1618
1619```json
1620{
1621  "terminal": {
1622    "alternate_scroll": "off",
1623    "blinking": "terminal_controlled",
1624    "copy_on_select": false,
1625    "dock": "bottom",
1626    "detect_venv": {
1627      "on": {
1628        "directories": [".env", "env", ".venv", "venv"],
1629        "activate_script": "default"
1630      }
1631    },
1632    "env": {},
1633    "font_family": null,
1634    "font_features": null,
1635    "font_size": null,
1636    "line_height": "comfortable",
1637    "option_as_meta": false,
1638    "button": false,
1639    "shell": {},
1640    "toolbar": {
1641      "breadcrumbs": true
1642    },
1643    "working_directory": "current_project_directory"
1644  }
1645}
1646```
1647
1648### Terminal: Dock
1649
1650- Description: Control the position of the dock
1651- Setting: `dock`
1652- Default: `bottom`
1653
1654**Options**
1655
1656`"bottom"`, `"left"` or `"right"`
1657
1658### Terminal: Alternate Scroll
1659
1660- 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.
1661- Setting: `alternate_scroll`
1662- Default: `off`
1663
1664**Options**
1665
16661. Default alternate scroll mode to on
1667
1668```json
1669{
1670  "terminal": {
1671    "alternate_scroll": "on"
1672  }
1673}
1674```
1675
16762. Default alternate scroll mode to off
1677
1678```json
1679{
1680  "terminal": {
1681    "alternate_scroll": "off"
1682  }
1683}
1684```
1685
1686### Terminal: Blinking
1687
1688- Description: Set the cursor blinking behavior in the terminal
1689- Setting: `blinking`
1690- Default: `terminal_controlled`
1691
1692**Options**
1693
16941. Never blink the cursor, ignore the terminal mode
1695
1696```json
1697{
1698  "terminal": {
1699    "blinking": "off"
1700  }
1701}
1702```
1703
17042. Default the cursor blink to off, but allow the terminal to turn blinking on
1705
1706```json
1707{
1708  "terminal": {
1709    "blinking": "terminal_controlled"
1710  }
1711}
1712```
1713
17143. Always blink the cursor, ignore the terminal mode
1715
1716```json
1717{
1718  "terminal": {
1719    "blinking": "on"
1720  }
1721}
1722```
1723
1724### Terminal: Copy On Select
1725
1726- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1727- Setting: `copy_on_select`
1728- Default: `false`
1729
1730**Options**
1731
1732`boolean` values
1733
1734**Example**
1735
1736```json
1737{
1738  "terminal": {
1739    "copy_on_select": true
1740  }
1741}
1742```
1743
1744### Terminal: Env
1745
1746- 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
1747- Setting: `env`
1748- Default: `{}`
1749
1750**Example**
1751
1752```json
1753{
1754  "terminal": {
1755    "env": {
1756      "ZED": "1",
1757      "KEY": "value1:value2"
1758    }
1759  }
1760}
1761```
1762
1763### Terminal: Font Size
1764
1765- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1766- Setting: `font_size`
1767- Default: `null`
1768
1769**Options**
1770
1771`integer` values
1772
1773```json
1774{
1775  "terminal": {
1776    "font_size": 15
1777  }
1778}
1779```
1780
1781### Terminal: Font Family
1782
1783- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1784- Setting: `font_family`
1785- Default: `null`
1786
1787**Options**
1788
1789The name of any font family installed on the user's system
1790
1791```json
1792{
1793  "terminal": {
1794    "font_family": "Berkeley Mono"
1795  }
1796}
1797```
1798
1799### Terminal: Font Features
1800
1801- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1802- Setting: `font_features`
1803- Default: `null`
1804- Platform: macOS and Windows.
1805
1806**Options**
1807
1808See Buffer Font Features
1809
1810```json
1811{
1812  "terminal": {
1813    "font_features": {
1814      "calt": false
1815      // See Buffer Font Features for more features
1816    }
1817  }
1818}
1819```
1820
1821### Terminal: Line Height
1822
1823- Description: Set the terminal's line height.
1824- Setting: `line_height`
1825- Default: `comfortable`
1826
1827**Options**
1828
18291. Use a line height that's `comfortable` for reading, 1.618. (default)
1830
1831```json
1832{
1833  "terminal": {
1834    "line_height": "comfortable"
1835  }
1836}
1837```
1838
18392. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
1840
1841```json
1842{
1843  "terminal": {
1844    "line_height": "standard"
1845  }
1846}
1847```
1848
18493.  Use a custom line height.
1850
1851```json
1852{
1853  "terminal": {
1854    "line_height": {
1855      "custom": 2
1856    }
1857  }
1858}
1859```
1860
1861### Terminal: Option As Meta
1862
1863- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1864- Setting: `option_as_meta`
1865- Default: `false`
1866
1867**Options**
1868
1869`boolean` values
1870
1871```json
1872{
1873  "terminal": {
1874    "option_as_meta": true
1875  }
1876}
1877```
1878
1879### Terminal: Shell
1880
1881- Description: What shell to use when launching the terminal.
1882- Setting: `shell`
1883- Default: `system`
1884
1885**Options**
1886
18871. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1888
1889```json
1890{
1891  "terminal": {
1892    "shell": "system"
1893  }
1894}
1895```
1896
18972. A program to launch:
1898
1899```json
1900{
1901  "terminal": {
1902    "shell": {
1903      "program": "sh"
1904    }
1905  }
1906}
1907```
1908
19093. A program with arguments:
1910
1911```json
1912{
1913  "terminal": {
1914    "shell": {
1915      "with_arguments": {
1916        "program": "/bin/bash",
1917        "args": ["--login"]
1918      }
1919    }
1920  }
1921}
1922```
1923
1924## Terminal: Detect Virtual Environments {#terminal-detect_venv}
1925
1926- Description: Activate the [Python Virtual Environment](https://docs.python.org/3/library/venv.html), if one is found, in the terminal's working directory (as resolved by the working_directory and automatically activating the virtual environment.
1927- Setting: `detect_venv`
1928- Default:
1929
1930```json
1931{
1932  "terminal": {
1933    "detect_venv": {
1934      "on": {
1935        // Default directories to search for virtual environments, relative
1936        // to the current working directory. We recommend overriding this
1937        // in your project's settings, rather than globally.
1938        "directories": [".venv", "venv"],
1939        // Can also be `csh`, `fish`, and `nushell`
1940        "activate_script": "default"
1941      }
1942    }
1943  }
1944}
1945```
1946
1947Disable with:
1948
1949```json
1950{
1951  "terminal": {
1952    "detect_venv": "off"
1953  }
1954}
1955```
1956
1957## Terminal: Toolbar
1958
1959- Description: Whether or not to show various elements in the terminal toolbar.
1960- Setting: `toolbar`
1961- Default:
1962
1963```json
1964{
1965  "terminal": {
1966    "toolbar": {
1967      "breadcrumbs": true
1968    }
1969  }
1970}
1971```
1972
1973**Options**
1974
1975At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
1976
1977If the terminal title is empty, the breadcrumbs won't be shown.
1978
1979The shell running in the terminal needs to be configured to emit the title.
1980
1981Example command to set the title: `echo -e "\e]2;New Title\007";`
1982
1983### Terminal: Button
1984
1985- Description: Control to show or hide the terminal button in the status bar
1986- Setting: `button`
1987- Default: `true`
1988
1989**Options**
1990
1991`boolean` values
1992
1993```json
1994{
1995  "terminal": {
1996    "button": false
1997  }
1998}
1999```
2000
2001### Terminal: Working Directory
2002
2003- Description: What working directory to use when launching the terminal.
2004- Setting: `working_directory`
2005- Default: `"current_project_directory"`
2006
2007**Options**
2008
20091. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2010
2011```json
2012{
2013  "terminal": {
2014    "working_directory": "current_project_directory"
2015  }
2016}
2017```
2018
20192. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2020
2021```json
2022{
2023  "terminal": {
2024    "working_directory": "first_project_directory"
2025  }
2026}
2027```
2028
20293. Always use this platform's home directory (if we can find it)
2030
2031```json
2032{
2033  "terminal": {
2034    "working_directory": "always_home"
2035  }
2036}
2037```
2038
20394. 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.
2040
2041```json
2042{
2043  "terminal": {
2044    "working_directory": {
2045      "always": {
2046        "directory": "~/zed/projects/"
2047      }
2048    }
2049  }
2050}
2051```
2052
2053## Theme
2054
2055- 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.
2056- Setting: `theme`
2057- Default: `One Dark`
2058
2059### Theme Object
2060
2061- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
2062- Setting: `theme`
2063- Default:
2064
2065```json
2066"theme": {
2067  "mode": "system",
2068  "dark": "One Dark",
2069  "light": "One Light"
2070},
2071```
2072
2073### Mode
2074
2075- Description: Specify theme mode.
2076- Setting: `mode`
2077- Default: `system`
2078
2079**Options**
2080
20811. Set the theme to dark mode
2082
2083```json
2084{
2085  "mode": "dark"
2086}
2087```
2088
20892. Set the theme to light mode
2090
2091```json
2092{
2093  "mode": "light"
2094}
2095```
2096
20973. Set the theme to system mode
2098
2099```json
2100{
2101  "mode": "system"
2102}
2103```
2104
2105### Dark
2106
2107- Description: The name of the dark Zed theme to use for the UI.
2108- Setting: `dark`
2109- Default: `One Dark`
2110
2111**Options**
2112
2113Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2114
2115### Light
2116
2117- Description: The name of the light Zed theme to use for the UI.
2118- Setting: `light`
2119- Default: `One Light`
2120
2121**Options**
2122
2123Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2124
2125## Vim
2126
2127- Description: Whether or not to enable vim mode (work in progress).
2128- Setting: `vim_mode`
2129- Default: `false`
2130
2131## Project Panel
2132
2133- Description: Customize project panel
2134- Setting: `project_panel`
2135- Default:
2136
2137```json
2138{
2139  "project_panel": {
2140    "button": true,
2141    "default_width": 240,
2142    "dock": "left",
2143    "file_icons": true,
2144    "folder_icons": true,
2145    "git_status": true,
2146    "indent_size": 20,
2147    "indent_guides": true,
2148    "auto_reveal_entries": true,
2149    "auto_fold_dirs": true,
2150    "scrollbar": {
2151      "show": null
2152    },
2153    "indent_guides": {
2154      "show": "always"
2155    }
2156  }
2157}
2158```
2159
2160### Dock
2161
2162- Description: Control the position of the dock
2163- Setting: `dock`
2164- Default: `left`
2165
2166**Options**
2167
21681. Default dock position to left
2169
2170```json
2171{
2172  "dock": "left"
2173}
2174```
2175
21762. Default dock position to right
2177
2178```json
2179{
2180  "dock": "right"
2181}
2182```
2183
2184### Git Status
2185
2186- Description: Indicates newly created and updated files
2187- Setting: `git_status`
2188- Default: `true`
2189
2190**Options**
2191
21921. Default enable git status
2193
2194```json
2195{
2196  "git_status": true
2197}
2198```
2199
22002. Default disable git status
2201
2202```json
2203{
2204  "git_status": false
2205}
2206```
2207
2208### Default Width
2209
2210- Description: Customize default width taken by project panel
2211- Setting: `default_width`
2212- Default: N/A width in pixels (eg: 420)
2213
2214**Options**
2215
2216`boolean` values
2217
2218### Auto Reveal Entries
2219
2220- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
2221- Setting: `auto_reveal_entries`
2222- Default: `true`
2223
2224**Options**
2225
22261. Enable auto reveal entries
2227
2228```json
2229{
2230  "auto_reveal_entries": true
2231}
2232```
2233
22342. Disable auto reveal entries
2235
2236```json
2237{
2238  "auto_reveal_entries": false
2239}
2240```
2241
2242### Auto Fold Dirs
2243
2244- Description: Whether to fold directories automatically when directory has only one directory inside.
2245- Setting: `auto_fold_dirs`
2246- Default: `true`
2247
2248**Options**
2249
22501. Enable auto fold dirs
2251
2252```json
2253{
2254  "auto_fold_dirs": true
2255}
2256```
2257
22582. Disable auto fold dirs
2259
2260```json
2261{
2262  "auto_fold_dirs": false
2263}
2264```
2265
2266### Indent Size
2267
2268- Description: Amount of indentation (in pixels) for nested items.
2269- Setting: `indent_size`
2270- Default: `20`
2271
2272### Indent Guides: Show
2273
2274- Description: Whether to show indent guides in the project panel. Possible values: "always", "never".
2275- Setting: `indent_guides`
2276
2277```json
2278"indent_guides": {
2279  "show": "always"
2280}
2281```
2282
2283**Options**
2284
22851. Show indent guides in the project panel
2286
2287```json
2288{
2289  "indent_guides": {
2290    "show": "always"
2291  }
2292}
2293```
2294
22952. Hide indent guides in the project panel
2296
2297```json
2298{
2299  "indent_guides": {
2300    "show": "never"
2301  }
2302}
2303```
2304
2305### Scrollbar: Show
2306
2307- Description: Whether to show a scrollbar in the project panel. Possible values: null, "auto", "system", "always", "never". Inherits editor settings when absent, see its description for more details.
2308- Setting: `scrollbar`
2309- Default:
2310
2311```json
2312"scrollbar": {
2313  "show": null
2314}
2315```
2316
2317**Options**
2318
23191. Show scrollbar in the project panel
2320
2321```json
2322{
2323  "scrollbar": {
2324    "show": "always"
2325  }
2326}
2327```
2328
23292. Hide scrollbar in the project panel
2330
2331```json
2332{
2333  "scrollbar": {
2334    "show": "never"
2335  }
2336}
2337```
2338
2339## Assistant Panel
2340
2341- Description: Customize assistant panel
2342- Setting: `assistant`
2343- Default:
2344
2345```json
2346"assistant": {
2347  "enabled": true,
2348  "button": true,
2349  "dock": "right",
2350  "default_width": 640,
2351  "default_height": 320,
2352  "provider": "openai",
2353  "version": "1",
2354},
2355```
2356
2357## Outline Panel
2358
2359- Description: Customize outline Panel
2360- Setting: `outline_panel`
2361- Default:
2362
2363```json
2364"outline_panel": {
2365  "button": true,
2366  "default_width": 240,
2367  "dock": "left",
2368  "file_icons": true,
2369  "folder_icons": true,
2370  "git_status": true,
2371  "indent_size": 20,
2372  "auto_reveal_entries": true,
2373  "auto_fold_dirs": true,
2374  "indent_guides": {
2375    "show": "always"
2376  },
2377  "scrollbar": {
2378    "show": null
2379  }
2380}
2381```
2382
2383## Calls
2384
2385- Description: Customize behavior when participating in a call
2386- Setting: `calls`
2387- Default:
2388
2389```json
2390"calls": {
2391  // Join calls with the microphone live by default
2392  "mute_on_join": false,
2393  // Share your project when you are the first to join a channel
2394  "share_on_join": false
2395},
2396```
2397
2398## Unnecessary Code Fade
2399
2400- Description: How much to fade out unused code.
2401- Setting: `unnecessary_code_fade`
2402- Default: `0.3`
2403
2404**Options**
2405
2406Float values between `0.0` and `0.9`, where:
2407
2408- `0.0` means no fading (unused code looks the same as used code)
2409- `0.9` means maximum fading (unused code is very faint but still visible)
2410
2411**Example**
2412
2413```json
2414{
2415  "unnecessary_code_fade": 0.5
2416}
2417```
2418
2419## UI Font Family
2420
2421- Description: The name of the font to use for text in the UI.
2422- Setting: `ui_font_family`
2423- Default: `Zed Plex Sans`
2424
2425**Options**
2426
2427The name of any font family installed on the system.
2428
2429## UI Font Features
2430
2431- Description: The OpenType features to enable for text in the UI.
2432- Setting: `ui_font_features`
2433- Default: `null`
2434- Platform: macOS and Windows.
2435
2436**Options**
2437
2438Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
2439
2440For example, to disable font ligatures, add the following to your settings:
2441
2442```json
2443{
2444  "ui_font_features": {
2445    "calt": false
2446  }
2447}
2448```
2449
2450You can also set other OpenType features, like setting `cv01` to `7`:
2451
2452```json
2453{
2454  "ui_font_features": {
2455    "cv01": 7
2456  }
2457}
2458```
2459
2460## UI Font Fallbacks
2461
2462- Description: The font fallbacks to use for text in the UI.
2463- Setting: `ui_font_fallbacks`
2464- Default: `null`
2465- Platform: macOS and Windows.
2466
2467**Options**
2468
2469For example, to use `Nerd Font` as a fallback, add the following to your settings:
2470
2471```json
2472{
2473  "ui_font_fallbacks": ["Nerd Font"]
2474}
2475```
2476
2477## UI Font Size
2478
2479- Description: The default font size for text in the UI.
2480- Setting: `ui_font_size`
2481- Default: `16`
2482
2483**Options**
2484
2485`integer` values from `6` to `100` pixels (inclusive)
2486
2487## UI Font Weight
2488
2489- Description: The default font weight for text in the UI.
2490- Setting: `ui_font_weight`
2491- Default: `400`
2492
2493**Options**
2494
2495`integer` values between `100` and `900`
2496
2497## An example configuration:
2498
2499```json
2500// ~/.config/zed/settings.json
2501{
2502  "theme": "cave-light",
2503  "tab_size": 2,
2504  "preferred_line_length": 80,
2505  "soft_wrap": "none",
2506
2507  "buffer_font_size": 18,
2508  "buffer_font_family": "Zed Plex Mono",
2509
2510  "autosave": "on_focus_change",
2511  "format_on_save": "off",
2512  "vim_mode": false,
2513  "projects_online_by_default": true,
2514  "terminal": {
2515    "font_family": "FiraCode Nerd Font Mono",
2516    "blinking": "off"
2517  },
2518  "languages": {
2519    "C": {
2520      "format_on_save": "language_server",
2521      "preferred_line_length": 64,
2522      "soft_wrap": "preferred_line_length"
2523    }
2524  }
2525}
2526```