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