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