configuring-zed.md

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