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