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  "always_show_close_button": false
 639},
 640```
 641
 642### Close Position
 643
 644- Description: Where to display close button within a tab.
 645- Setting: `close_position`
 646- Default: `right`
 647
 648**Options**
 649
 6501. Display the close button on the right:
 651
 652```json
 653{
 654  "close_position": "right"
 655}
 656```
 657
 6582. Display the close button on the left:
 659
 660```json
 661{
 662  "close_position": "left"
 663}
 664```
 665
 666### File Icons
 667
 668- Description: Whether to show the file icon for a tab.
 669- Setting: `file_icons`
 670- Default: `false`
 671
 672### Git Status
 673
 674- Description: Whether or not to show Git file status in tab.
 675- Setting: `git_status`
 676- Default: `false`
 677
 678### Activate on close
 679
 680- Description: What to do after closing the current tab.
 681- Setting: `activate_on_close`
 682- Default: `history`
 683
 684**Options**
 685
 6861.  Activate the tab that was open previously:
 687
 688```json
 689{
 690  "activate_on_close": "history"
 691}
 692```
 693
 6942. Activate the neighbour tab (prefers the right one, if present):
 695
 696```json
 697{
 698  "activate_on_close": "neighbour"
 699}
 700```
 701
 702### Always show the close button
 703
 704- Description: Whether to always show the close button on tabs.
 705- Setting: `always_show_close_button`
 706- Default: `false`
 707
 708## Editor Toolbar
 709
 710- Description: Whether or not to show various elements in the editor toolbar.
 711- Setting: `toolbar`
 712- Default:
 713
 714```json
 715"toolbar": {
 716  "breadcrumbs": true,
 717  "quick_actions": true
 718},
 719```
 720
 721**Options**
 722
 723Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
 724
 725## Enable Language Server
 726
 727- Description: Whether or not to use language servers to provide code intelligence.
 728- Setting: `enable_language_server`
 729- Default: `true`
 730
 731**Options**
 732
 733`boolean` values
 734
 735## Ensure Final Newline On Save
 736
 737- Description: Whether or not to ensure there's a single newline at the end of a buffer when saving it.
 738- Setting: `ensure_final_newline_on_save`
 739- Default: `true`
 740
 741**Options**
 742
 743`boolean` values
 744
 745## LSP
 746
 747- Description: Configuration for language servers.
 748- Setting: `lsp`
 749- Default: `null`
 750
 751**Options**
 752
 753The following settings can be overridden for specific language servers:
 754
 755- `initialization_options`
 756- `settings`
 757
 758To override configuration for a language server, add an entry for that language server's name to the `lsp` value.
 759
 760Some 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.
 761
 762For example to pass the `check` option to `rust-analyzer`, use the following configuration:
 763
 764```json
 765"lsp": {
 766  "rust-analyzer": {
 767    "initialization_options": {
 768      "check": {
 769        "command": "clippy" // rust-analyzer.check.command (default: "check")
 770      }
 771    }
 772  }
 773}
 774```
 775
 776While other options may be changed at a runtime and should be placed under `settings`:
 777
 778```json
 779"lsp": {
 780  "yaml-language-server": {
 781    "settings": {
 782      "yaml": {
 783        "keyOrdering": true // Enforces alphabetical ordering of keys in maps
 784      }
 785    }
 786  }
 787}
 788```
 789
 790## Format On Save
 791
 792- Description: Whether or not to perform a buffer format before saving.
 793- Setting: `format_on_save`
 794- Default: `on`
 795
 796**Options**
 797
 7981. `on`, enables format on save obeying `formatter` setting:
 799
 800```json
 801{
 802  "format_on_save": "on"
 803}
 804```
 805
 8062. `off`, disables format on save:
 807
 808```json
 809{
 810  "format_on_save": "off"
 811}
 812```
 813
 814## Formatter
 815
 816- Description: How to perform a buffer format.
 817- Setting: `formatter`
 818- Default: `auto`
 819
 820**Options**
 821
 8221. To use the current language server, use `"language_server"`:
 823
 824```json
 825{
 826  "formatter": "language_server"
 827}
 828```
 829
 8302. 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):
 831
 832```json
 833{
 834  "formatter": {
 835    "external": {
 836      "command": "sed",
 837      "arguments": ["-e", "s/ *$//"]
 838    }
 839  }
 840}
 841```
 842
 8433. 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.
 844
 845WARNING: `{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.
 846
 847```json
 848  "formatter": {
 849    "external": {
 850      "command": "prettier",
 851      "arguments": ["--stdin-filepath", "{buffer_path}"]
 852    }
 853  }
 854```
 855
 8564. Or to use code actions provided by the connected language servers, use `"code_actions"`:
 857
 858```json
 859{
 860  "formatter": {
 861    "code_actions": {
 862      // Use ESLint's --fix:
 863      "source.fixAll.eslint": true,
 864      // Organize imports on save:
 865      "source.organizeImports": true
 866    }
 867  }
 868}
 869```
 870
 8715. Or to use multiple formatters consecutively, use an array of formatters:
 872
 873```json
 874{
 875  "formatter": [
 876    {"language_server": {"name": "rust-analyzer"}},
 877    {"external": {
 878      "command": "sed",
 879      "arguments": ["-e", "s/ *$//"]
 880    }
 881  ]
 882}
 883```
 884
 885Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
 886If any of the formatters fails, the subsequent ones will still be executed.
 887
 888## Code Actions On Format
 889
 890- Description: The code actions to perform with the primary language server when formatting the buffer.
 891- Setting: `code_actions_on_format`
 892- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
 893
 894**Examples**
 895
 896<!--
 897TBD: Add Python Ruff source.organizeImports example
 898-->
 899
 9001. Organize imports on format in TypeScript and TSX buffers:
 901
 902```json
 903{
 904  "languages": {
 905    "TypeScript": {
 906      "code_actions_on_format": {
 907        "source.organizeImports": true
 908      }
 909    },
 910    "TSX": {
 911      "code_actions_on_format": {
 912        "source.organizeImports": true
 913      }
 914    }
 915  }
 916}
 917```
 918
 9192. Run ESLint `fixAll` code action when formatting:
 920
 921```json
 922{
 923  "languages": {
 924    "JavaScript": {
 925      "code_actions_on_format": {
 926        "source.fixAll.eslint": true
 927      }
 928    }
 929  }
 930}
 931```
 932
 9333. Run only a single ESLint rule when using `fixAll`:
 934
 935```json
 936{
 937  "languages": {
 938    "JavaScript": {
 939      "code_actions_on_format": {
 940        "source.fixAll.eslint": true
 941      }
 942    }
 943  },
 944  "lsp": {
 945    "eslint": {
 946      "settings": {
 947        "codeActionOnSave": {
 948          "rules": ["import/order"]
 949        }
 950      }
 951    }
 952  }
 953}
 954```
 955
 956## Auto close
 957
 958- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
 959- Setting: `use_autoclose`
 960- Default: `true`
 961
 962**Options**
 963
 964`boolean` values
 965
 966## Always Treat Brackets As Autoclosed
 967
 968- Description: Controls how the editor handles the autoclosed characters.
 969- Setting: `always_treat_brackets_as_autoclosed`
 970- Default: `false`
 971
 972**Options**
 973
 974`boolean` values
 975
 976**Example**
 977
 978If the setting is set to `true`:
 979
 9801. Enter in the editor: `)))`
 9812. Move the cursor to the start: `^)))`
 9823. Enter again: `)))`
 983
 984The result is still `)))` and not `))))))`, which is what it would be by default.
 985
 986## File Scan Exclusions
 987
 988- Setting: `file_scan_exclusions`
 989- 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.
 990- Default:
 991
 992```json
 993"file_scan_exclusions": [
 994  "**/.git",
 995  "**/.svn",
 996  "**/.hg",
 997  "**/.jj",
 998  "**/CVS",
 999  "**/.DS_Store",
1000  "**/Thumbs.db",
1001  "**/.classpath",
1002  "**/.settings"
1003],
1004```
1005
1006Note, 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.
1007
1008## File Types
1009
1010- Setting: `file_types`
1011- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
1012- Default: `{}`
1013
1014**Examples**
1015
1016To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
1017
1018```json
1019{
1020  "file_types": {
1021    "C++": ["c"],
1022    "TOML": ["MyLockFile"],
1023    "Dockerfile": ["Dockerfile*"]
1024  }
1025}
1026```
1027
1028## Git
1029
1030- Description: Configuration for git-related features.
1031- Setting: `git`
1032- Default:
1033
1034```json
1035{
1036  "git": {
1037    "git_gutter": "tracked_files",
1038    "inline_blame": {
1039      "enabled": true
1040    }
1041  }
1042}
1043```
1044
1045### Git Gutter
1046
1047- Description: Whether or not to show the git gutter.
1048- Setting: `git_gutter`
1049- Default: `tracked_files`
1050
1051**Options**
1052
10531. Show git gutter in tracked files
1054
1055```json
1056{
1057  "git": {
1058    "git_gutter": "tracked_files"
1059  }
1060}
1061```
1062
10632. Hide git gutter
1064
1065```json
1066{
1067  "git": {
1068    "git_gutter": "hide"
1069  }
1070}
1071```
1072
1073### Inline Git Blame
1074
1075- Description: Whether or not to show git blame information inline, on the currently focused line.
1076- Setting: `inline_blame`
1077- Default:
1078
1079```json
1080{
1081  "git": {
1082    "inline_blame": {
1083      "enabled": true
1084    }
1085  }
1086}
1087```
1088
1089**Options**
1090
10911. Disable inline git blame:
1092
1093```json
1094{
1095  "git": {
1096    "inline_blame": {
1097      "enabled": false
1098    }
1099  }
1100}
1101```
1102
11032. Only show inline git blame after a delay (that starts after cursor stops moving):
1104
1105```json
1106{
1107  "git": {
1108    "inline_blame": {
1109      "enabled": true,
1110      "delay_ms": 500
1111    }
1112  }
1113}
1114```
1115
11163. Show a commit summary next to the commit date and author:
1117
1118```json
1119{
1120  "git": {
1121    "inline_blame": {
1122      "enabled": true,
1123      "show_commit_summary": true
1124    }
1125  }
1126}
1127```
1128
11294. Use this as the minimum column at which to display inline blame information:
1130
1131```json
1132{
1133  "git": {
1134    "inline_blame": {
1135      "enabled": true,
1136      "min_column": 80
1137    }
1138  }
1139}
1140```
1141
1142## Indent Guides
1143
1144- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1145- Setting: `indent_guides`
1146- Default:
1147
1148```json
1149{
1150  "indent_guides": {
1151    "enabled": true,
1152    "line_width": 1,
1153    "active_line_width": 1,
1154    "coloring": "fixed",
1155    "background_coloring": "disabled"
1156  }
1157}
1158```
1159
1160**Options**
1161
11621. Disable indent guides
1163
1164```json
1165{
1166  "indent_guides": {
1167    "enabled": false
1168  }
1169}
1170```
1171
11722. Enable indent guides for a specific language.
1173
1174```json
1175{
1176  "languages": {
1177    "Python": {
1178      "indent_guides": {
1179        "enabled": true
1180      }
1181    }
1182  }
1183}
1184```
1185
11863. Enable indent aware coloring ("rainbow indentation").
1187   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.
1188
1189```json
1190{
1191  "indent_guides": {
1192    "enabled": true,
1193    "coloring": "indent_aware"
1194  }
1195}
1196```
1197
11984. Enable indent aware background coloring ("rainbow indentation").
1199   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.
1200
1201```json
1202{
1203  "indent_guides": {
1204    "enabled": true,
1205    "coloring": "indent_aware",
1206    "background_coloring": "indent_aware"
1207  }
1208}
1209```
1210
1211## Hard Tabs
1212
1213- Description: Whether to indent lines using tab characters or multiple spaces.
1214- Setting: `hard_tabs`
1215- Default: `false`
1216
1217**Options**
1218
1219`boolean` values
1220
1221## Hover Popover Enabled
1222
1223- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1224- Setting: `hover_popover_enabled`
1225- Default: `true`
1226
1227**Options**
1228
1229`boolean` values
1230
1231## Inlay hints
1232
1233- Description: Configuration for displaying extra text with hints in the editor.
1234- Setting: `inlay_hints`
1235- Default:
1236
1237```json
1238"inlay_hints": {
1239  "enabled": false,
1240  "show_type_hints": true,
1241  "show_parameter_hints": true,
1242  "show_other_hints": true,
1243  "show_background": false,
1244  "edit_debounce_ms": 700,
1245  "scroll_debounce_ms": 50
1246}
1247```
1248
1249**Options**
1250
1251Inlay hints querying consists of two parts: editor (client) and LSP server.
1252With 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.
1253At 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.
1254
1255The following languages have inlay hints preconfigured by Zed:
1256
1257- [Go](https://docs.zed.dev/languages/go)
1258- [Rust](https://docs.zed.dev/languages/rust)
1259- [Svelte](https://docs.zed.dev/languages/svelte)
1260- [Typescript](https://docs.zed.dev/languages/typescript)
1261
1262Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
1263
1264Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
1265Settings-related hint updates are not debounced.
1266
1267## Journal
1268
1269- Description: Configuration for the journal.
1270- Setting: `journal`
1271- Default:
1272
1273```json
1274"journal": {
1275  "path": "~",
1276  "hour_format": "hour12"
1277}
1278```
1279
1280### Path
1281
1282- Description: The path of the directory where journal entries are stored.
1283- Setting: `path`
1284- Default: `~`
1285
1286**Options**
1287
1288`string` values
1289
1290### Hour Format
1291
1292- Description: The format to use for displaying hours in the journal.
1293- Setting: `hour_format`
1294- Default: `hour12`
1295
1296**Options**
1297
12981. 12-hour format:
1299
1300```json
1301{
1302  "hour_format": "hour12"
1303}
1304```
1305
13062. 24-hour format:
1307
1308```json
1309{
1310  "hour_format": "hour24"
1311}
1312```
1313
1314## Languages
1315
1316- Description: Configuration for specific languages.
1317- Setting: `languages`
1318- Default: `null`
1319
1320**Options**
1321
1322To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1323
1324```json
1325"languages": {
1326  "C": {
1327    "format_on_save": "off",
1328    "preferred_line_length": 64,
1329    "soft_wrap": "preferred_line_length"
1330  },
1331  "JSON": {
1332    "tab_size": 4
1333  }
1334}
1335```
1336
1337The following settings can be overridden for each specific language:
1338
1339- [`enable_language_server`](#enable-language-server)
1340- [`ensure_final_newline_on_save`](#ensure-final-newline-on-save)
1341- [`format_on_save`](#format-on-save)
1342- [`formatter`](#formatter)
1343- [`hard_tabs`](#hard-tabs)
1344- [`preferred_line_length`](#preferred-line-length)
1345- [`remove_trailing_whitespace_on_save`](#remove-trailing-whitespace-on-save)
1346- [`show_inline_completions`](#show-inline-completions)
1347- [`show_whitespaces`](#show-whitespaces)
1348- [`soft_wrap`](#soft-wrap)
1349- [`tab_size`](#tab-size)
1350- [`use_autoclose`](#use-autoclose)
1351- [`always_treat_brackets_as_autoclosed`](#always-treat-brackets-as-autoclosed)
1352
1353These values take in the same options as the root-level settings with the same name.
1354
1355## Network Proxy
1356
1357- Description: Configure a network proxy for Zed.
1358- Setting: `proxy`
1359- Default: `null`
1360
1361**Options**
1362
1363The proxy setting must contain a URL to the proxy.
1364
1365The following URI schemes are supported:
1366
1367- `http`
1368- `https`
1369- `socks4` - SOCKS4 proxy with local DNS
1370- `socks4a` - SOCKS4 proxy with remote DNS
1371- `socks5` - SOCKS5 proxy with local DNS
1372- `socks5h` - SOCKS5 proxy with remote DNS
1373
1374`http` will be used when no scheme is specified.
1375
1376By 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`.
1377
1378For example, to set an `http` proxy, add the following to your settings:
1379
1380```json
1381{
1382  "proxy": "http://127.0.0.1:10809"
1383}
1384```
1385
1386Or to set a `socks5` proxy:
1387
1388```json
1389{
1390  "proxy": "socks5h://localhost:10808"
1391}
1392```
1393
1394## Preview tabs
1395
1396- Description:
1397  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. \
1398   There are several ways to convert a preview tab into a regular tab:
1399
1400  - Double-clicking on the file
1401  - Double-clicking on the tab header
1402  - Using the `project_panel::OpenPermanent` action
1403  - Editing the file
1404  - Dragging the file to a different pane
1405
1406- Setting: `preview_tabs`
1407- Default:
1408
1409```json
1410"preview_tabs": {
1411  "enabled": true,
1412  "enable_preview_from_file_finder": false,
1413  "enable_preview_from_code_navigation": false,
1414}
1415```
1416
1417### Enable preview from file finder
1418
1419- Description: Determines whether to open files in preview mode when selected from the file finder.
1420- Setting: `enable_preview_from_file_finder`
1421- Default: `false`
1422
1423**Options**
1424
1425`boolean` values
1426
1427### Enable preview from code navigation
1428
1429- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1430- Setting: `enable_preview_from_code_navigation`
1431- Default: `false`
1432
1433**Options**
1434
1435`boolean` values
1436
1437## File Finder
1438
1439### Modal Max Width
1440
1441- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
1442- Setting: `max_modal_width`
1443- Default: `small`
1444
1445## Preferred Line Length
1446
1447- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1448- Setting: `preferred_line_length`
1449- Default: `80`
1450
1451**Options**
1452
1453`integer` values
1454
1455## Projects Online By Default
1456
1457- Description: Whether or not to show the online projects view by default.
1458- Setting: `projects_online_by_default`
1459- Default: `true`
1460
1461**Options**
1462
1463`boolean` values
1464
1465## Remove Trailing Whitespace On Save
1466
1467- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1468- Setting: `remove_trailing_whitespace_on_save`
1469- Default: `true`
1470
1471**Options**
1472
1473`boolean` values
1474
1475## Search
1476
1477- Description: Search options to enable by default when opening new project and buffer searches.
1478- Setting: `search`
1479- Default:
1480
1481```json
1482"search": {
1483  "whole_word": false,
1484  "case_sensitive": false,
1485  "include_ignored": false,
1486  "regex": false
1487},
1488```
1489
1490## Show Call Status Icon
1491
1492- Description: Whether or not to show the call status icon in the status bar.
1493- Setting: `show_call_status_icon`
1494- Default: `true`
1495
1496**Options**
1497
1498`boolean` values
1499
1500## Show Completions On Input
1501
1502- Description: Whether or not to show completions as you type.
1503- Setting: `show_completions_on_input`
1504- Default: `true`
1505
1506**Options**
1507
1508`boolean` values
1509
1510## Show Completion Documentation
1511
1512- Description: Whether to display inline and alongside documentation for items in the completions menu.
1513- Setting: `show_completion_documentation`
1514- Default: `true`
1515
1516**Options**
1517
1518`boolean` values
1519
1520## Show Inline Completions
1521
1522- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1523- Setting: `show_inline_completions`
1524- Default: `true`
1525
1526**Options**
1527
1528`boolean` values
1529
1530## Show Whitespaces
1531
1532- Description: Whether or not to show render whitespace characters in the editor.
1533- Setting: `show_whitespaces`
1534- Default: `selection`
1535
1536**Options**
1537
15381. `all`
15392. `selection`
15403. `none`
15414. `boundary`
1542
1543## Soft Wrap
1544
1545- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1546- Setting: `soft_wrap`
1547- Default: `none`
1548
1549**Options**
1550
15511. `none` to avoid wrapping generally, unless the line is too long
15522. `prefer_line` (deprecated, same as `none`)
15533. `editor_width` to wrap lines that overflow the editor width
15544. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
1555
1556## Wrap Guides (Vertical Rulers)
1557
1558- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1559- Setting: `wrap_guides`
1560- Default: []
1561
1562**Options**
1563
1564List of `integer` column numbers
1565
1566## Tab Size
1567
1568- Description: The number of spaces to use for each tab character.
1569- Setting: `tab_size`
1570- Default: `4`
1571
1572**Options**
1573
1574`integer` values
1575
1576## Telemetry
1577
1578- Description: Control what info is collected by Zed.
1579- Setting: `telemetry`
1580- Default:
1581
1582```json
1583"telemetry": {
1584  "diagnostics": true,
1585  "metrics": true
1586},
1587```
1588
1589**Options**
1590
1591### Diagnostics
1592
1593- Description: Setting for sending debug-related data, such as crash reports.
1594- Setting: `diagnostics`
1595- Default: `true`
1596
1597**Options**
1598
1599`boolean` values
1600
1601### Metrics
1602
1603- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1604- Setting: `metrics`
1605- Default: `true`
1606
1607**Options**
1608
1609`boolean` values
1610
1611## Terminal
1612
1613- Description: Configuration for the terminal.
1614- Setting: `terminal`
1615- Default:
1616
1617```json
1618{
1619  "terminal": {
1620    "alternate_scroll": "off",
1621    "blinking": "terminal_controlled",
1622    "copy_on_select": false,
1623    "dock": "bottom",
1624    "detect_venv": {
1625      "on": {
1626        "directories": [".env", "env", ".venv", "venv"],
1627        "activate_script": "default"
1628      }
1629    },
1630    "env": {},
1631    "font_family": null,
1632    "font_features": null,
1633    "font_size": null,
1634    "line_height": "comfortable",
1635    "option_as_meta": false,
1636    "button": false,
1637    "shell": {},
1638    "toolbar": {
1639      "breadcrumbs": true
1640    },
1641    "working_directory": "current_project_directory"
1642  }
1643}
1644```
1645
1646### Terminal: Dock
1647
1648- Description: Control the position of the dock
1649- Setting: `dock`
1650- Default: `bottom`
1651
1652**Options**
1653
1654`"bottom"`, `"left"` or `"right"`
1655
1656### Terminal: Alternate Scroll
1657
1658- 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.
1659- Setting: `alternate_scroll`
1660- Default: `off`
1661
1662**Options**
1663
16641. Default alternate scroll mode to on
1665
1666```json
1667{
1668  "terminal": {
1669    "alternate_scroll": "on"
1670  }
1671}
1672```
1673
16742. Default alternate scroll mode to off
1675
1676```json
1677{
1678  "terminal": {
1679    "alternate_scroll": "off"
1680  }
1681}
1682```
1683
1684### Terminal: Blinking
1685
1686- Description: Set the cursor blinking behavior in the terminal
1687- Setting: `blinking`
1688- Default: `terminal_controlled`
1689
1690**Options**
1691
16921. Never blink the cursor, ignore the terminal mode
1693
1694```json
1695{
1696  "terminal": {
1697    "blinking": "off"
1698  }
1699}
1700```
1701
17022. Default the cursor blink to off, but allow the terminal to turn blinking on
1703
1704```json
1705{
1706  "terminal": {
1707    "blinking": "terminal_controlled"
1708  }
1709}
1710```
1711
17123. Always blink the cursor, ignore the terminal mode
1713
1714```json
1715{
1716  "terminal": {
1717    "blinking": "on"
1718  }
1719}
1720```
1721
1722### Terminal: Copy On Select
1723
1724- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1725- Setting: `copy_on_select`
1726- Default: `false`
1727
1728**Options**
1729
1730`boolean` values
1731
1732**Example**
1733
1734```json
1735{
1736  "terminal": {
1737    "copy_on_select": true
1738  }
1739}
1740```
1741
1742### Terminal: Env
1743
1744- 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
1745- Setting: `env`
1746- Default: `{}`
1747
1748**Example**
1749
1750```json
1751{
1752  "terminal": {
1753    "env": {
1754      "ZED": "1",
1755      "KEY": "value1:value2"
1756    }
1757  }
1758}
1759```
1760
1761### Terminal: Font Size
1762
1763- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1764- Setting: `font_size`
1765- Default: `null`
1766
1767**Options**
1768
1769`integer` values
1770
1771```json
1772{
1773  "terminal": {
1774    "font_size": 15
1775  }
1776}
1777```
1778
1779### Terminal: Font Family
1780
1781- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1782- Setting: `font_family`
1783- Default: `null`
1784
1785**Options**
1786
1787The name of any font family installed on the user's system
1788
1789```json
1790{
1791  "terminal": {
1792    "font_family": "Berkeley Mono"
1793  }
1794}
1795```
1796
1797### Terminal: Font Features
1798
1799- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1800- Setting: `font_features`
1801- Default: `null`
1802- Platform: macOS and Windows.
1803
1804**Options**
1805
1806See Buffer Font Features
1807
1808```json
1809{
1810  "terminal": {
1811    "font_features": {
1812      "calt": false
1813      // See Buffer Font Features for more features
1814    }
1815  }
1816}
1817```
1818
1819### Terminal: Line Height
1820
1821- Description: Set the terminal's line height.
1822- Setting: `line_height`
1823- Default: `comfortable`
1824
1825**Options**
1826
18271. Use a line height that's `comfortable` for reading, 1.618. (default)
1828
1829```json
1830{
1831  "terminal": {
1832    "line_height": "comfortable"
1833  }
1834}
1835```
1836
18372. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
1838
1839```json
1840{
1841  "terminal": {
1842    "line_height": "standard"
1843  }
1844}
1845```
1846
18473.  Use a custom line height.
1848
1849```json
1850{
1851  "terminal": {
1852    "line_height": {
1853      "custom": 2
1854    }
1855  }
1856}
1857```
1858
1859### Terminal: Option As Meta
1860
1861- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1862- Setting: `option_as_meta`
1863- Default: `false`
1864
1865**Options**
1866
1867`boolean` values
1868
1869```json
1870{
1871  "terminal": {
1872    "option_as_meta": true
1873  }
1874}
1875```
1876
1877### Terminal: Shell
1878
1879- Description: What shell to use when launching the terminal.
1880- Setting: `shell`
1881- Default: `system`
1882
1883**Options**
1884
18851. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1886
1887```json
1888{
1889  "terminal": {
1890    "shell": "system"
1891  }
1892}
1893```
1894
18952. A program to launch:
1896
1897```json
1898{
1899  "terminal": {
1900    "shell": {
1901      "program": "sh"
1902    }
1903  }
1904}
1905```
1906
19073. A program with arguments:
1908
1909```json
1910{
1911  "terminal": {
1912    "shell": {
1913      "with_arguments": {
1914        "program": "/bin/bash",
1915        "args": ["--login"]
1916      }
1917    }
1918  }
1919}
1920```
1921
1922## Terminal: Detect Virtual Environments {#terminal-detect_venv}
1923
1924- 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.
1925- Setting: `detect_venv`
1926- Default:
1927
1928```json
1929{
1930  "terminal": {
1931    "detect_venv": {
1932      "on": {
1933        // Default directories to search for virtual environments, relative
1934        // to the current working directory. We recommend overriding this
1935        // in your project's settings, rather than globally.
1936        "directories": [".venv", "venv"],
1937        // Can also be `csh`, `fish`, and `nushell`
1938        "activate_script": "default"
1939      }
1940    }
1941  }
1942}
1943```
1944
1945Disable with:
1946
1947```json
1948{
1949  "terminal": {
1950    "detect_venv": "off"
1951  }
1952}
1953```
1954
1955## Terminal: Toolbar
1956
1957- Description: Whether or not to show various elements in the terminal toolbar.
1958- Setting: `toolbar`
1959- Default:
1960
1961```json
1962{
1963  "terminal": {
1964    "toolbar": {
1965      "breadcrumbs": true
1966    }
1967  }
1968}
1969```
1970
1971**Options**
1972
1973At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
1974
1975If the terminal title is empty, the breadcrumbs won't be shown.
1976
1977The shell running in the terminal needs to be configured to emit the title.
1978
1979Example command to set the title: `echo -e "\e]2;New Title\007";`
1980
1981### Terminal: Button
1982
1983- Description: Control to show or hide the terminal button in the status bar
1984- Setting: `button`
1985- Default: `true`
1986
1987**Options**
1988
1989`boolean` values
1990
1991```json
1992{
1993  "terminal": {
1994    "button": false
1995  }
1996}
1997```
1998
1999### Terminal: Working Directory
2000
2001- Description: What working directory to use when launching the terminal.
2002- Setting: `working_directory`
2003- Default: `"current_project_directory"`
2004
2005**Options**
2006
20071. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2008
2009```json
2010{
2011  "terminal": {
2012    "working_directory": "current_project_directory"
2013  }
2014}
2015```
2016
20172. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2018
2019```json
2020{
2021  "terminal": {
2022    "working_directory": "first_project_directory"
2023  }
2024}
2025```
2026
20273. Always use this platform's home directory (if we can find it)
2028
2029```json
2030{
2031  "terminal": {
2032    "working_directory": "always_home"
2033  }
2034}
2035```
2036
20374. 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.
2038
2039```json
2040{
2041  "terminal": {
2042    "working_directory": {
2043      "always": {
2044        "directory": "~/zed/projects/"
2045      }
2046    }
2047  }
2048}
2049```
2050
2051## Theme
2052
2053- 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.
2054- Setting: `theme`
2055- Default: `One Dark`
2056
2057### Theme Object
2058
2059- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
2060- Setting: `theme`
2061- Default:
2062
2063```json
2064"theme": {
2065  "mode": "system",
2066  "dark": "One Dark",
2067  "light": "One Light"
2068},
2069```
2070
2071### Mode
2072
2073- Description: Specify theme mode.
2074- Setting: `mode`
2075- Default: `system`
2076
2077**Options**
2078
20791. Set the theme to dark mode
2080
2081```json
2082{
2083  "mode": "dark"
2084}
2085```
2086
20872. Set the theme to light mode
2088
2089```json
2090{
2091  "mode": "light"
2092}
2093```
2094
20953. Set the theme to system mode
2096
2097```json
2098{
2099  "mode": "system"
2100}
2101```
2102
2103### Dark
2104
2105- Description: The name of the dark Zed theme to use for the UI.
2106- Setting: `dark`
2107- Default: `One Dark`
2108
2109**Options**
2110
2111Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2112
2113### Light
2114
2115- Description: The name of the light Zed theme to use for the UI.
2116- Setting: `light`
2117- Default: `One Light`
2118
2119**Options**
2120
2121Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2122
2123## Vim
2124
2125- Description: Whether or not to enable vim mode (work in progress).
2126- Setting: `vim_mode`
2127- Default: `false`
2128
2129## Project Panel
2130
2131- Description: Customize project panel
2132- Setting: `project_panel`
2133- Default:
2134
2135```json
2136{
2137  "project_panel": {
2138    "button": true,
2139    "default_width": 240,
2140    "dock": "left",
2141    "file_icons": true,
2142    "folder_icons": true,
2143    "git_status": true,
2144    "indent_size": 20,
2145    "indent_guides": true,
2146    "auto_reveal_entries": true,
2147    "auto_fold_dirs": true,
2148    "scrollbar": {
2149      "show": null
2150    },
2151    "indent_guides": {
2152      "show": "always"
2153    }
2154  }
2155}
2156```
2157
2158### Dock
2159
2160- Description: Control the position of the dock
2161- Setting: `dock`
2162- Default: `left`
2163
2164**Options**
2165
21661. Default dock position to left
2167
2168```json
2169{
2170  "dock": "left"
2171}
2172```
2173
21742. Default dock position to right
2175
2176```json
2177{
2178  "dock": "right"
2179}
2180```
2181
2182### Git Status
2183
2184- Description: Indicates newly created and updated files
2185- Setting: `git_status`
2186- Default: `true`
2187
2188**Options**
2189
21901. Default enable git status
2191
2192```json
2193{
2194  "git_status": true
2195}
2196```
2197
21982. Default disable git status
2199
2200```json
2201{
2202  "git_status": false
2203}
2204```
2205
2206### Default Width
2207
2208- Description: Customize default width taken by project panel
2209- Setting: `default_width`
2210- Default: N/A width in pixels (eg: 420)
2211
2212**Options**
2213
2214`boolean` values
2215
2216### Auto Reveal Entries
2217
2218- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
2219- Setting: `auto_reveal_entries`
2220- Default: `true`
2221
2222**Options**
2223
22241. Enable auto reveal entries
2225
2226```json
2227{
2228  "auto_reveal_entries": true
2229}
2230```
2231
22322. Disable auto reveal entries
2233
2234```json
2235{
2236  "auto_reveal_entries": false
2237}
2238```
2239
2240### Auto Fold Dirs
2241
2242- Description: Whether to fold directories automatically when directory has only one directory inside.
2243- Setting: `auto_fold_dirs`
2244- Default: `true`
2245
2246**Options**
2247
22481. Enable auto fold dirs
2249
2250```json
2251{
2252  "auto_fold_dirs": true
2253}
2254```
2255
22562. Disable auto fold dirs
2257
2258```json
2259{
2260  "auto_fold_dirs": false
2261}
2262```
2263
2264### Indent Size
2265
2266- Description: Amount of indentation (in pixels) for nested items.
2267- Setting: `indent_size`
2268- Default: `20`
2269
2270### Indent Guides: Show
2271
2272- Description: Whether to show indent guides in the project panel. Possible values: "always", "never".
2273- Setting: `indent_guides`
2274
2275```json
2276"indent_guides": {
2277  "show": "always"
2278}
2279```
2280
2281**Options**
2282
22831. Show indent guides in the project panel
2284
2285```json
2286{
2287  "indent_guides": {
2288    "show": "always"
2289  }
2290}
2291```
2292
22932. Hide indent guides in the project panel
2294
2295```json
2296{
2297  "indent_guides": {
2298    "show": "never"
2299  }
2300}
2301```
2302
2303### Scrollbar: Show
2304
2305- 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.
2306- Setting: `scrollbar`
2307- Default:
2308
2309```json
2310"scrollbar": {
2311  "show": null
2312}
2313```
2314
2315**Options**
2316
23171. Show scrollbar in the project panel
2318
2319```json
2320{
2321  "scrollbar": {
2322    "show": "always"
2323  }
2324}
2325```
2326
23272. Hide scrollbar in the project panel
2328
2329```json
2330{
2331  "scrollbar": {
2332    "show": "never"
2333  }
2334}
2335```
2336
2337## Assistant Panel
2338
2339- Description: Customize assistant panel
2340- Setting: `assistant`
2341- Default:
2342
2343```json
2344"assistant": {
2345  "enabled": true,
2346  "button": true,
2347  "dock": "right",
2348  "default_width": 640,
2349  "default_height": 320,
2350  "provider": "openai",
2351  "version": "1",
2352},
2353```
2354
2355## Outline Panel
2356
2357- Description: Customize outline Panel
2358- Setting: `outline_panel`
2359- Default:
2360
2361```json
2362"outline_panel": {
2363  "button": true,
2364  "default_width": 240,
2365  "dock": "left",
2366  "file_icons": true,
2367  "folder_icons": true,
2368  "git_status": true,
2369  "indent_size": 20,
2370  "auto_reveal_entries": true,
2371  "auto_fold_dirs": true,
2372  "indent_guides": {
2373    "show": "always"
2374  },
2375  "scrollbar": {
2376    "show": null
2377  }
2378}
2379```
2380
2381## Calls
2382
2383- Description: Customize behavior when participating in a call
2384- Setting: `calls`
2385- Default:
2386
2387```json
2388"calls": {
2389  // Join calls with the microphone live by default
2390  "mute_on_join": false,
2391  // Share your project when you are the first to join a channel
2392  "share_on_join": false
2393},
2394```
2395
2396## Unnecessary Code Fade
2397
2398- Description: How much to fade out unused code.
2399- Setting: `unnecessary_code_fade`
2400- Default: `0.3`
2401
2402**Options**
2403
2404Float values between `0.0` and `0.9`, where:
2405
2406- `0.0` means no fading (unused code looks the same as used code)
2407- `0.9` means maximum fading (unused code is very faint but still visible)
2408
2409**Example**
2410
2411```json
2412{
2413  "unnecessary_code_fade": 0.5
2414}
2415```
2416
2417## UI Font Family
2418
2419- Description: The name of the font to use for text in the UI.
2420- Setting: `ui_font_family`
2421- Default: `Zed Plex Sans`
2422
2423**Options**
2424
2425The name of any font family installed on the system.
2426
2427## UI Font Features
2428
2429- Description: The OpenType features to enable for text in the UI.
2430- Setting: `ui_font_features`
2431- Default: `null`
2432- Platform: macOS and Windows.
2433
2434**Options**
2435
2436Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
2437
2438For example, to disable font ligatures, add the following to your settings:
2439
2440```json
2441{
2442  "ui_font_features": {
2443    "calt": false
2444  }
2445}
2446```
2447
2448You can also set other OpenType features, like setting `cv01` to `7`:
2449
2450```json
2451{
2452  "ui_font_features": {
2453    "cv01": 7
2454  }
2455}
2456```
2457
2458## UI Font Fallbacks
2459
2460- Description: The font fallbacks to use for text in the UI.
2461- Setting: `ui_font_fallbacks`
2462- Default: `null`
2463- Platform: macOS and Windows.
2464
2465**Options**
2466
2467For example, to use `Nerd Font` as a fallback, add the following to your settings:
2468
2469```json
2470{
2471  "ui_font_fallbacks": ["Nerd Font"]
2472}
2473```
2474
2475## UI Font Size
2476
2477- Description: The default font size for text in the UI.
2478- Setting: `ui_font_size`
2479- Default: `16`
2480
2481**Options**
2482
2483`integer` values from `6` to `100` pixels (inclusive)
2484
2485## UI Font Weight
2486
2487- Description: The default font weight for text in the UI.
2488- Setting: `ui_font_weight`
2489- Default: `400`
2490
2491**Options**
2492
2493`integer` values between `100` and `900`
2494
2495## An example configuration:
2496
2497```json
2498// ~/.config/zed/settings.json
2499{
2500  "theme": "cave-light",
2501  "tab_size": 2,
2502  "preferred_line_length": 80,
2503  "soft_wrap": "none",
2504
2505  "buffer_font_size": 18,
2506  "buffer_font_family": "Zed Plex Mono",
2507
2508  "autosave": "on_focus_change",
2509  "format_on_save": "off",
2510  "vim_mode": false,
2511  "projects_online_by_default": true,
2512  "terminal": {
2513    "font_family": "FiraCode Nerd Font Mono",
2514    "blinking": "off"
2515  },
2516  "languages": {
2517    "C": {
2518      "format_on_save": "language_server",
2519      "preferred_line_length": 64,
2520      "soft_wrap": "preferred_line_length"
2521    }
2522  }
2523}
2524```