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