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