configuring-zed.md

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