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