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## Completion Documentation Debounce Delay
1521
1522- Description: The debounce delay before re-querying the language server for completion documentation when not included in original completion list.
1523- Setting: `completion_documentation_secondary_query_debounce`
1524- Default: `300` ms
1525
1526**Options**
1527
1528`integer` values
1529
1530## Show Inline Completions
1531
1532- Description: Whether to show inline completions as you type or manually by triggering `editor::ShowInlineCompletion`.
1533- Setting: `show_inline_completions`
1534- Default: `true`
1535
1536**Options**
1537
1538`boolean` values
1539
1540## Show Whitespaces
1541
1542- Description: Whether or not to show render whitespace characters in the editor.
1543- Setting: `show_whitespaces`
1544- Default: `selection`
1545
1546**Options**
1547
15481. `all`
15492. `selection`
15503. `none`
15514. `boundary`
1552
1553## Soft Wrap
1554
1555- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
1556- Setting: `soft_wrap`
1557- Default: `none`
1558
1559**Options**
1560
15611. `none` to avoid wrapping generally, unless the line is too long
15622. `prefer_line` (deprecated, same as `none`)
15633. `editor_width` to wrap lines that overflow the editor width
15644. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
1565
1566## Wrap Guides (Vertical Rulers)
1567
1568- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
1569- Setting: `wrap_guides`
1570- Default: []
1571
1572**Options**
1573
1574List of `integer` column numbers
1575
1576## Tab Size
1577
1578- Description: The number of spaces to use for each tab character.
1579- Setting: `tab_size`
1580- Default: `4`
1581
1582**Options**
1583
1584`integer` values
1585
1586## Telemetry
1587
1588- Description: Control what info is collected by Zed.
1589- Setting: `telemetry`
1590- Default:
1591
1592```json
1593"telemetry": {
1594  "diagnostics": true,
1595  "metrics": true
1596},
1597```
1598
1599**Options**
1600
1601### Diagnostics
1602
1603- Description: Setting for sending debug-related data, such as crash reports.
1604- Setting: `diagnostics`
1605- Default: `true`
1606
1607**Options**
1608
1609`boolean` values
1610
1611### Metrics
1612
1613- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
1614- Setting: `metrics`
1615- Default: `true`
1616
1617**Options**
1618
1619`boolean` values
1620
1621## Terminal
1622
1623- Description: Configuration for the terminal.
1624- Setting: `terminal`
1625- Default:
1626
1627```json
1628{
1629  "terminal": {
1630    "alternate_scroll": "off",
1631    "blinking": "terminal_controlled",
1632    "copy_on_select": false,
1633    "dock": "bottom",
1634    "detect_venv": {
1635      "on": {
1636        "directories": [".env", "env", ".venv", "venv"],
1637        "activate_script": "default"
1638      }
1639    },
1640    "env": {},
1641    "font_family": null,
1642    "font_features": null,
1643    "font_size": null,
1644    "line_height": "comfortable",
1645    "option_as_meta": false,
1646    "button": false,
1647    "shell": {},
1648    "toolbar": {
1649      "breadcrumbs": true
1650    },
1651    "working_directory": "current_project_directory"
1652  }
1653}
1654```
1655
1656### Terminal: Dock
1657
1658- Description: Control the position of the dock
1659- Setting: `dock`
1660- Default: `bottom`
1661
1662**Options**
1663
1664`"bottom"`, `"left"` or `"right"`
1665
1666### Terminal: Alternate Scroll
1667
1668- 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.
1669- Setting: `alternate_scroll`
1670- Default: `off`
1671
1672**Options**
1673
16741. Default alternate scroll mode to on
1675
1676```json
1677{
1678  "terminal": {
1679    "alternate_scroll": "on"
1680  }
1681}
1682```
1683
16842. Default alternate scroll mode to off
1685
1686```json
1687{
1688  "terminal": {
1689    "alternate_scroll": "off"
1690  }
1691}
1692```
1693
1694### Terminal: Blinking
1695
1696- Description: Set the cursor blinking behavior in the terminal
1697- Setting: `blinking`
1698- Default: `terminal_controlled`
1699
1700**Options**
1701
17021. Never blink the cursor, ignore the terminal mode
1703
1704```json
1705{
1706  "terminal": {
1707    "blinking": "off"
1708  }
1709}
1710```
1711
17122. Default the cursor blink to off, but allow the terminal to turn blinking on
1713
1714```json
1715{
1716  "terminal": {
1717    "blinking": "terminal_controlled"
1718  }
1719}
1720```
1721
17223. Always blink the cursor, ignore the terminal mode
1723
1724```json
1725{
1726  "terminal": {
1727    "blinking": "on"
1728  }
1729}
1730```
1731
1732### Terminal: Copy On Select
1733
1734- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
1735- Setting: `copy_on_select`
1736- Default: `false`
1737
1738**Options**
1739
1740`boolean` values
1741
1742**Example**
1743
1744```json
1745{
1746  "terminal": {
1747    "copy_on_select": true
1748  }
1749}
1750```
1751
1752### Terminal: Env
1753
1754- 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
1755- Setting: `env`
1756- Default: `{}`
1757
1758**Example**
1759
1760```json
1761{
1762  "terminal": {
1763    "env": {
1764      "ZED": "1",
1765      "KEY": "value1:value2"
1766    }
1767  }
1768}
1769```
1770
1771### Terminal: Font Size
1772
1773- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
1774- Setting: `font_size`
1775- Default: `null`
1776
1777**Options**
1778
1779`integer` values
1780
1781```json
1782{
1783  "terminal": {
1784    "font_size": 15
1785  }
1786}
1787```
1788
1789### Terminal: Font Family
1790
1791- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
1792- Setting: `font_family`
1793- Default: `null`
1794
1795**Options**
1796
1797The name of any font family installed on the user's system
1798
1799```json
1800{
1801  "terminal": {
1802    "font_family": "Berkeley Mono"
1803  }
1804}
1805```
1806
1807### Terminal: Font Features
1808
1809- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
1810- Setting: `font_features`
1811- Default: `null`
1812- Platform: macOS and Windows.
1813
1814**Options**
1815
1816See Buffer Font Features
1817
1818```json
1819{
1820  "terminal": {
1821    "font_features": {
1822      "calt": false
1823      // See Buffer Font Features for more features
1824    }
1825  }
1826}
1827```
1828
1829### Terminal: Line Height
1830
1831- Description: Set the terminal's line height.
1832- Setting: `line_height`
1833- Default: `comfortable`
1834
1835**Options**
1836
18371. Use a line height that's `comfortable` for reading, 1.618. (default)
1838
1839```json
1840{
1841  "terminal": {
1842    "line_height": "comfortable"
1843  }
1844}
1845```
1846
18472. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
1848
1849```json
1850{
1851  "terminal": {
1852    "line_height": "standard"
1853  }
1854}
1855```
1856
18573.  Use a custom line height.
1858
1859```json
1860{
1861  "terminal": {
1862    "line_height": {
1863      "custom": 2
1864    }
1865  }
1866}
1867```
1868
1869### Terminal: Option As Meta
1870
1871- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
1872- Setting: `option_as_meta`
1873- Default: `false`
1874
1875**Options**
1876
1877`boolean` values
1878
1879```json
1880{
1881  "terminal": {
1882    "option_as_meta": true
1883  }
1884}
1885```
1886
1887### Terminal: Shell
1888
1889- Description: What shell to use when launching the terminal.
1890- Setting: `shell`
1891- Default: `system`
1892
1893**Options**
1894
18951. Use the system's default terminal configuration (usually the `/etc/passwd` file).
1896
1897```json
1898{
1899  "terminal": {
1900    "shell": "system"
1901  }
1902}
1903```
1904
19052. A program to launch:
1906
1907```json
1908{
1909  "terminal": {
1910    "shell": {
1911      "program": "sh"
1912    }
1913  }
1914}
1915```
1916
19173. A program with arguments:
1918
1919```json
1920{
1921  "terminal": {
1922    "shell": {
1923      "with_arguments": {
1924        "program": "/bin/bash",
1925        "args": ["--login"]
1926      }
1927    }
1928  }
1929}
1930```
1931
1932## Terminal: Detect Virtual Environments {#terminal-detect_venv}
1933
1934- 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.
1935- Setting: `detect_venv`
1936- Default:
1937
1938```json
1939{
1940  "terminal": {
1941    "detect_venv": {
1942      "on": {
1943        // Default directories to search for virtual environments, relative
1944        // to the current working directory. We recommend overriding this
1945        // in your project's settings, rather than globally.
1946        "directories": [".venv", "venv"],
1947        // Can also be `csh`, `fish`, and `nushell`
1948        "activate_script": "default"
1949      }
1950    }
1951  }
1952}
1953```
1954
1955Disable with:
1956
1957```json
1958{
1959  "terminal": {
1960    "detect_venv": "off"
1961  }
1962}
1963```
1964
1965## Terminal: Toolbar
1966
1967- Description: Whether or not to show various elements in the terminal toolbar.
1968- Setting: `toolbar`
1969- Default:
1970
1971```json
1972{
1973  "terminal": {
1974    "toolbar": {
1975      "breadcrumbs": true
1976    }
1977  }
1978}
1979```
1980
1981**Options**
1982
1983At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
1984
1985If the terminal title is empty, the breadcrumbs won't be shown.
1986
1987The shell running in the terminal needs to be configured to emit the title.
1988
1989Example command to set the title: `echo -e "\e]2;New Title\007";`
1990
1991### Terminal: Button
1992
1993- Description: Control to show or hide the terminal button in the status bar
1994- Setting: `button`
1995- Default: `true`
1996
1997**Options**
1998
1999`boolean` values
2000
2001```json
2002{
2003  "terminal": {
2004    "button": false
2005  }
2006}
2007```
2008
2009### Terminal: Working Directory
2010
2011- Description: What working directory to use when launching the terminal.
2012- Setting: `working_directory`
2013- Default: `"current_project_directory"`
2014
2015**Options**
2016
20171. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2018
2019```json
2020{
2021  "terminal": {
2022    "working_directory": "current_project_directory"
2023  }
2024}
2025```
2026
20272. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2028
2029```json
2030{
2031  "terminal": {
2032    "working_directory": "first_project_directory"
2033  }
2034}
2035```
2036
20373. Always use this platform's home directory (if we can find it)
2038
2039```json
2040{
2041  "terminal": {
2042    "working_directory": "always_home"
2043  }
2044}
2045```
2046
20474. 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.
2048
2049```json
2050{
2051  "terminal": {
2052    "working_directory": {
2053      "always": {
2054        "directory": "~/zed/projects/"
2055      }
2056    }
2057  }
2058}
2059```
2060
2061## Theme
2062
2063- 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.
2064- Setting: `theme`
2065- Default: `One Dark`
2066
2067### Theme Object
2068
2069- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
2070- Setting: `theme`
2071- Default:
2072
2073```json
2074"theme": {
2075  "mode": "system",
2076  "dark": "One Dark",
2077  "light": "One Light"
2078},
2079```
2080
2081### Mode
2082
2083- Description: Specify theme mode.
2084- Setting: `mode`
2085- Default: `system`
2086
2087**Options**
2088
20891. Set the theme to dark mode
2090
2091```json
2092{
2093  "mode": "dark"
2094}
2095```
2096
20972. Set the theme to light mode
2098
2099```json
2100{
2101  "mode": "light"
2102}
2103```
2104
21053. Set the theme to system mode
2106
2107```json
2108{
2109  "mode": "system"
2110}
2111```
2112
2113### Dark
2114
2115- Description: The name of the dark Zed theme to use for the UI.
2116- Setting: `dark`
2117- Default: `One Dark`
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### Light
2124
2125- Description: The name of the light Zed theme to use for the UI.
2126- Setting: `light`
2127- Default: `One Light`
2128
2129**Options**
2130
2131Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2132
2133## Vim
2134
2135- Description: Whether or not to enable vim mode (work in progress).
2136- Setting: `vim_mode`
2137- Default: `false`
2138
2139## Project Panel
2140
2141- Description: Customize project panel
2142- Setting: `project_panel`
2143- Default:
2144
2145```json
2146{
2147  "project_panel": {
2148    "button": true,
2149    "default_width": 240,
2150    "dock": "left",
2151    "file_icons": true,
2152    "folder_icons": true,
2153    "git_status": true,
2154    "indent_size": 20,
2155    "indent_guides": true,
2156    "auto_reveal_entries": true,
2157    "auto_fold_dirs": true,
2158    "scrollbar": {
2159      "show": null
2160    },
2161    "indent_guides": {
2162      "show": "always"
2163    }
2164  }
2165}
2166```
2167
2168### Dock
2169
2170- Description: Control the position of the dock
2171- Setting: `dock`
2172- Default: `left`
2173
2174**Options**
2175
21761. Default dock position to left
2177
2178```json
2179{
2180  "dock": "left"
2181}
2182```
2183
21842. Default dock position to right
2185
2186```json
2187{
2188  "dock": "right"
2189}
2190```
2191
2192### Git Status
2193
2194- Description: Indicates newly created and updated files
2195- Setting: `git_status`
2196- Default: `true`
2197
2198**Options**
2199
22001. Default enable git status
2201
2202```json
2203{
2204  "git_status": true
2205}
2206```
2207
22082. Default disable git status
2209
2210```json
2211{
2212  "git_status": false
2213}
2214```
2215
2216### Default Width
2217
2218- Description: Customize default width taken by project panel
2219- Setting: `default_width`
2220- Default: N/A width in pixels (eg: 420)
2221
2222**Options**
2223
2224`boolean` values
2225
2226### Auto Reveal Entries
2227
2228- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
2229- Setting: `auto_reveal_entries`
2230- Default: `true`
2231
2232**Options**
2233
22341. Enable auto reveal entries
2235
2236```json
2237{
2238  "auto_reveal_entries": true
2239}
2240```
2241
22422. Disable auto reveal entries
2243
2244```json
2245{
2246  "auto_reveal_entries": false
2247}
2248```
2249
2250### Auto Fold Dirs
2251
2252- Description: Whether to fold directories automatically when directory has only one directory inside.
2253- Setting: `auto_fold_dirs`
2254- Default: `true`
2255
2256**Options**
2257
22581. Enable auto fold dirs
2259
2260```json
2261{
2262  "auto_fold_dirs": true
2263}
2264```
2265
22662. Disable auto fold dirs
2267
2268```json
2269{
2270  "auto_fold_dirs": false
2271}
2272```
2273
2274### Indent Size
2275
2276- Description: Amount of indentation (in pixels) for nested items.
2277- Setting: `indent_size`
2278- Default: `20`
2279
2280### Indent Guides: Show
2281
2282- Description: Whether to show indent guides in the project panel. Possible values: "always", "never".
2283- Setting: `indent_guides`
2284
2285```json
2286"indent_guides": {
2287  "show": "always"
2288}
2289```
2290
2291**Options**
2292
22931. Show indent guides in the project panel
2294
2295```json
2296{
2297  "indent_guides": {
2298    "show": "always"
2299  }
2300}
2301```
2302
23032. Hide indent guides in the project panel
2304
2305```json
2306{
2307  "indent_guides": {
2308    "show": "never"
2309  }
2310}
2311```
2312
2313### Scrollbar: Show
2314
2315- 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.
2316- Setting: `scrollbar`
2317- Default:
2318
2319```json
2320"scrollbar": {
2321  "show": null
2322}
2323```
2324
2325**Options**
2326
23271. Show scrollbar in the project panel
2328
2329```json
2330{
2331  "scrollbar": {
2332    "show": "always"
2333  }
2334}
2335```
2336
23372. Hide scrollbar in the project panel
2338
2339```json
2340{
2341  "scrollbar": {
2342    "show": "never"
2343  }
2344}
2345```
2346
2347## Assistant Panel
2348
2349- Description: Customize assistant panel
2350- Setting: `assistant`
2351- Default:
2352
2353```json
2354"assistant": {
2355  "enabled": true,
2356  "button": true,
2357  "dock": "right",
2358  "default_width": 640,
2359  "default_height": 320,
2360  "provider": "openai",
2361  "version": "1",
2362},
2363```
2364
2365## Outline Panel
2366
2367- Description: Customize outline Panel
2368- Setting: `outline_panel`
2369- Default:
2370
2371```json
2372"outline_panel": {
2373  "button": true,
2374  "default_width": 240,
2375  "dock": "left",
2376  "file_icons": true,
2377  "folder_icons": true,
2378  "git_status": true,
2379  "indent_size": 20,
2380  "auto_reveal_entries": true,
2381  "auto_fold_dirs": true,
2382  "indent_guides": {
2383    "show": "always"
2384  },
2385  "scrollbar": {
2386    "show": null
2387  }
2388}
2389```
2390
2391## Calls
2392
2393- Description: Customize behavior when participating in a call
2394- Setting: `calls`
2395- Default:
2396
2397```json
2398"calls": {
2399  // Join calls with the microphone live by default
2400  "mute_on_join": false,
2401  // Share your project when you are the first to join a channel
2402  "share_on_join": false
2403},
2404```
2405
2406## Unnecessary Code Fade
2407
2408- Description: How much to fade out unused code.
2409- Setting: `unnecessary_code_fade`
2410- Default: `0.3`
2411
2412**Options**
2413
2414Float values between `0.0` and `0.9`, where:
2415
2416- `0.0` means no fading (unused code looks the same as used code)
2417- `0.9` means maximum fading (unused code is very faint but still visible)
2418
2419**Example**
2420
2421```json
2422{
2423  "unnecessary_code_fade": 0.5
2424}
2425```
2426
2427## UI Font Family
2428
2429- Description: The name of the font to use for text in the UI.
2430- Setting: `ui_font_family`
2431- Default: `Zed Plex Sans`
2432
2433**Options**
2434
2435The name of any font family installed on the system.
2436
2437## UI Font Features
2438
2439- Description: The OpenType features to enable for text in the UI.
2440- Setting: `ui_font_features`
2441- Default: `null`
2442- Platform: macOS and Windows.
2443
2444**Options**
2445
2446Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
2447
2448For example, to disable font ligatures, add the following to your settings:
2449
2450```json
2451{
2452  "ui_font_features": {
2453    "calt": false
2454  }
2455}
2456```
2457
2458You can also set other OpenType features, like setting `cv01` to `7`:
2459
2460```json
2461{
2462  "ui_font_features": {
2463    "cv01": 7
2464  }
2465}
2466```
2467
2468## UI Font Fallbacks
2469
2470- Description: The font fallbacks to use for text in the UI.
2471- Setting: `ui_font_fallbacks`
2472- Default: `null`
2473- Platform: macOS and Windows.
2474
2475**Options**
2476
2477For example, to use `Nerd Font` as a fallback, add the following to your settings:
2478
2479```json
2480{
2481  "ui_font_fallbacks": ["Nerd Font"]
2482}
2483```
2484
2485## UI Font Size
2486
2487- Description: The default font size for text in the UI.
2488- Setting: `ui_font_size`
2489- Default: `16`
2490
2491**Options**
2492
2493`integer` values from `6` to `100` pixels (inclusive)
2494
2495## UI Font Weight
2496
2497- Description: The default font weight for text in the UI.
2498- Setting: `ui_font_weight`
2499- Default: `400`
2500
2501**Options**
2502
2503`integer` values between `100` and `900`
2504
2505## An example configuration:
2506
2507```json
2508// ~/.config/zed/settings.json
2509{
2510  "theme": "cave-light",
2511  "tab_size": 2,
2512  "preferred_line_length": 80,
2513  "soft_wrap": "none",
2514
2515  "buffer_font_size": 18,
2516  "buffer_font_family": "Zed Plex Mono",
2517
2518  "autosave": "on_focus_change",
2519  "format_on_save": "off",
2520  "vim_mode": false,
2521  "projects_online_by_default": true,
2522  "terminal": {
2523    "font_family": "FiraCode Nerd Font Mono",
2524    "blinking": "off"
2525  },
2526  "languages": {
2527    "C": {
2528      "format_on_save": "language_server",
2529      "preferred_line_length": 64,
2530      "soft_wrap": "preferred_line_length"
2531    }
2532  }
2533}
2534```