configuring-zed.md

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