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