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  "show_close_button": "hover"
 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### Show close button
 870
 871- Description: Controls the appearance behavior of the tab's close button.
 872- Setting: `show_close_button`
 873- Default: `hover`
 874
 875**Options**
 876
 8771.  Show it just upon hovering the tab:
 878
 879```json
 880{
 881  "show_close_button": "hover"
 882}
 883```
 884
 8852. Show it persistently:
 886
 887```json
 888{
 889  "show_close_button": "always"
 890}
 891```
 892
 8933. Never show it, even if hovering it:
 894
 895```json
 896{
 897  "show_close_button": "hidden"
 898}
 899```
 900
 901## Editor Toolbar
 902
 903- Description: Whether or not to show various elements in the editor toolbar.
 904- Setting: `toolbar`
 905- Default:
 906
 907```json
 908"toolbar": {
 909  "breadcrumbs": true,
 910  "quick_actions": true
 911},
 912```
 913
 914**Options**
 915
 916Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
 917
 918## Enable Language Server
 919
 920- Description: Whether or not to use language servers to provide code intelligence.
 921- Setting: `enable_language_server`
 922- Default: `true`
 923
 924**Options**
 925
 926`boolean` values
 927
 928## Ensure Final Newline On Save
 929
 930- Description: Removes any lines containing only whitespace at the end of the file and ensures just one newline at the end.
 931- Setting: `ensure_final_newline_on_save`
 932- Default: `true`
 933
 934**Options**
 935
 936`boolean` values
 937
 938## LSP
 939
 940- Description: Configuration for language servers.
 941- Setting: `lsp`
 942- Default: `null`
 943
 944**Options**
 945
 946The following settings can be overridden for specific language servers:
 947
 948- `initialization_options`
 949- `settings`
 950
 951To override configuration for a language server, add an entry for that language server's name to the `lsp` value.
 952
 953Some 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.
 954
 955For example to pass the `check` option to `rust-analyzer`, use the following configuration:
 956
 957```json
 958"lsp": {
 959  "rust-analyzer": {
 960    "initialization_options": {
 961      "check": {
 962        "command": "clippy" // rust-analyzer.check.command (default: "check")
 963      }
 964    }
 965  }
 966}
 967```
 968
 969While other options may be changed at a runtime and should be placed under `settings`:
 970
 971```json
 972"lsp": {
 973  "yaml-language-server": {
 974    "settings": {
 975      "yaml": {
 976        "keyOrdering": true // Enforces alphabetical ordering of keys in maps
 977      }
 978    }
 979  }
 980}
 981```
 982
 983## LSP Highlight Debounce
 984
 985- Description: The debounce delay in milliseconds before querying highlights from the language server based on the current cursor location.
 986- Setting: `lsp_highlight_debounce`
 987- Default: `75`
 988
 989**Options**
 990
 991`integer` values representing milliseconds
 992
 993## Format On Save
 994
 995- Description: Whether or not to perform a buffer format before saving.
 996- Setting: `format_on_save`
 997- Default: `on`
 998
 999**Options**
1000
10011. `on`, enables format on save obeying `formatter` setting:
1002
1003```json
1004{
1005  "format_on_save": "on"
1006}
1007```
1008
10092. `off`, disables format on save:
1010
1011```json
1012{
1013  "format_on_save": "off"
1014}
1015```
1016
1017## Formatter
1018
1019- Description: How to perform a buffer format.
1020- Setting: `formatter`
1021- Default: `auto`
1022
1023**Options**
1024
10251. To use the current language server, use `"language_server"`:
1026
1027```json
1028{
1029  "formatter": "language_server"
1030}
1031```
1032
10332. 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):
1034
1035```json
1036{
1037  "formatter": {
1038    "external": {
1039      "command": "sed",
1040      "arguments": ["-e", "s/ *$//"]
1041    }
1042  }
1043}
1044```
1045
10463. 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.
1047
1048WARNING: `{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.
1049
1050```json
1051  "formatter": {
1052    "external": {
1053      "command": "prettier",
1054      "arguments": ["--stdin-filepath", "{buffer_path}"]
1055    }
1056  }
1057```
1058
10594. Or to use code actions provided by the connected language servers, use `"code_actions"`:
1060
1061```json
1062{
1063  "formatter": {
1064    "code_actions": {
1065      // Use ESLint's --fix:
1066      "source.fixAll.eslint": true,
1067      // Organize imports on save:
1068      "source.organizeImports": true
1069    }
1070  }
1071}
1072```
1073
10745. Or to use multiple formatters consecutively, use an array of formatters:
1075
1076```json
1077{
1078  "formatter": [
1079    { "language_server": { "name": "rust-analyzer" } },
1080    {
1081      "external": {
1082        "command": "sed",
1083        "arguments": ["-e", "s/ *$//"]
1084      }
1085    }
1086  ]
1087}
1088```
1089
1090Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
1091If any of the formatters fails, the subsequent ones will still be executed.
1092
1093## Code Actions On Format
1094
1095- Description: The code actions to perform with the primary language server when formatting the buffer.
1096- Setting: `code_actions_on_format`
1097- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
1098
1099**Examples**
1100
1101<!--
1102TBD: Add Python Ruff source.organizeImports example
1103-->
1104
11051. Organize imports on format in TypeScript and TSX buffers:
1106
1107```json
1108{
1109  "languages": {
1110    "TypeScript": {
1111      "code_actions_on_format": {
1112        "source.organizeImports": true
1113      }
1114    },
1115    "TSX": {
1116      "code_actions_on_format": {
1117        "source.organizeImports": true
1118      }
1119    }
1120  }
1121}
1122```
1123
11242. Run ESLint `fixAll` code action when formatting:
1125
1126```json
1127{
1128  "languages": {
1129    "JavaScript": {
1130      "code_actions_on_format": {
1131        "source.fixAll.eslint": true
1132      }
1133    }
1134  }
1135}
1136```
1137
11383. Run only a single ESLint rule when using `fixAll`:
1139
1140```json
1141{
1142  "languages": {
1143    "JavaScript": {
1144      "code_actions_on_format": {
1145        "source.fixAll.eslint": true
1146      }
1147    }
1148  },
1149  "lsp": {
1150    "eslint": {
1151      "settings": {
1152        "codeActionOnSave": {
1153          "rules": ["import/order"]
1154        }
1155      }
1156    }
1157  }
1158}
1159```
1160
1161## Auto close
1162
1163- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
1164- Setting: `use_autoclose`
1165- Default: `true`
1166
1167**Options**
1168
1169`boolean` values
1170
1171## Always Treat Brackets As Autoclosed
1172
1173- Description: Controls how the editor handles the autoclosed characters.
1174- Setting: `always_treat_brackets_as_autoclosed`
1175- Default: `false`
1176
1177**Options**
1178
1179`boolean` values
1180
1181**Example**
1182
1183If the setting is set to `true`:
1184
11851. Enter in the editor: `)))`
11862. Move the cursor to the start: `^)))`
11873. Enter again: `)))`
1188
1189The result is still `)))` and not `))))))`, which is what it would be by default.
1190
1191## File Scan Exclusions
1192
1193- Setting: `file_scan_exclusions`
1194- 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`.
1195- Default:
1196
1197```json
1198"file_scan_exclusions": [
1199  "**/.git",
1200  "**/.svn",
1201  "**/.hg",
1202  "**/.jj",
1203  "**/CVS",
1204  "**/.DS_Store",
1205  "**/Thumbs.db",
1206  "**/.classpath",
1207  "**/.settings"
1208],
1209```
1210
1211Note, 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.
1212
1213## File Scan Inclusions
1214
1215- Setting: `file_scan_inclusions`
1216- 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.
1217- Default:
1218
1219```json
1220"file_scan_inclusions": [".env*"],
1221```
1222
1223## File Types
1224
1225- Setting: `file_types`
1226- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
1227- Default: `{}`
1228
1229**Examples**
1230
1231To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
1232
1233```json
1234{
1235  "file_types": {
1236    "C++": ["c"],
1237    "TOML": ["MyLockFile"],
1238    "Dockerfile": ["Dockerfile*"]
1239  }
1240}
1241```
1242
1243## Diagnostics
1244
1245- Description: Configuration for diagnostics-related features.
1246- Setting: `diagnostics`
1247- Default:
1248
1249```json
1250{
1251  "diagnostics": {
1252    "include_warnings": true,
1253    "inline": {
1254      "enabled": false
1255    }
1256    "update_with_cursor": false,
1257    "primary_only": false,
1258    "use_rendered": false,
1259  }
1260}
1261```
1262
1263### Inline Diagnostics
1264
1265- Description: Whether or not to show diagnostics information inline.
1266- Setting: `inline`
1267- Default:
1268
1269```json
1270{
1271  "diagnostics": {
1272    "inline": {
1273      "enabled": false,
1274      "update_debounce_ms": 150,
1275      "padding": 4,
1276      "min_column": 0,
1277      "max_severity": null
1278    }
1279  }
1280}
1281```
1282
1283**Options**
1284
12851. Enable inline diagnostics.
1286
1287```json
1288{
1289  "diagnostics": {
1290    "inline": {
1291      "enabled": true
1292    }
1293  }
1294}
1295```
1296
12972. Delay diagnostic updates until some time after the last diagnostic update.
1298
1299```json
1300{
1301  "diagnostics": {
1302    "inline": {
1303      "enabled": true,
1304      "update_debounce_ms": 150
1305    }
1306  }
1307}
1308```
1309
13103. Set padding between the end of the source line and the start of the diagnostic.
1311
1312```json
1313{
1314  "diagnostics": {
1315    "inline": {
1316      "enabled": true,
1317      "padding": 4
1318    }
1319  }
1320}
1321```
1322
13234. Horizontally align inline diagnostics at the given column.
1324
1325```json
1326{
1327  "diagnostics": {
1328    "inline": {
1329      "enabled": true,
1330      "min_column": 80
1331    }
1332  }
1333}
1334```
1335
13365. Show only warning and error diagnostics.
1337
1338```json
1339{
1340  "diagnostics": {
1341    "inline": {
1342      "enabled": true,
1343      "max_severity": "warning"
1344    }
1345  }
1346}
1347```
1348
1349## Git
1350
1351- Description: Configuration for git-related features.
1352- Setting: `git`
1353- Default:
1354
1355```json
1356{
1357  "git": {
1358    "git_gutter": "tracked_files",
1359    "inline_blame": {
1360      "enabled": true
1361    },
1362    "hunk_style": "staged_hollow"
1363  }
1364}
1365```
1366
1367### Git Gutter
1368
1369- Description: Whether or not to show the git gutter.
1370- Setting: `git_gutter`
1371- Default: `tracked_files`
1372
1373**Options**
1374
13751. Show git gutter in tracked files
1376
1377```json
1378{
1379  "git": {
1380    "git_gutter": "tracked_files"
1381  }
1382}
1383```
1384
13852. Hide git gutter
1386
1387```json
1388{
1389  "git": {
1390    "git_gutter": "hide"
1391  }
1392}
1393```
1394
1395### Gutter Debounce
1396
1397- Description: Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
1398- Setting: `gutter_debounce`
1399- Default: `null`
1400
1401**Options**
1402
1403`integer` values representing milliseconds
1404
1405Example:
1406
1407```json
1408{
1409  "git": {
1410    "gutter_debounce": 100
1411  }
1412}
1413```
1414
1415### Inline Git Blame
1416
1417- Description: Whether or not to show git blame information inline, on the currently focused line.
1418- Setting: `inline_blame`
1419- Default:
1420
1421```json
1422{
1423  "git": {
1424    "inline_blame": {
1425      "enabled": true
1426    }
1427  }
1428}
1429```
1430
1431### Hunk Style
1432
1433- Description: What styling we should use for the diff hunks.
1434- Setting: `hunk_style`
1435- Default:
1436
1437```json
1438{
1439  "git": {
1440    "hunk_style": "staged_hollow"
1441  }
1442}
1443```
1444
1445**Options**
1446
14471. Show the staged hunks faded out and with a border:
1448
1449```json
1450{
1451  "git": {
1452    "hunk_style": "staged_hollow"
1453  }
1454}
1455```
1456
14572. Show unstaged hunks faded out and with a border:
1458
1459```json
1460{
1461  "git": {
1462    "hunk_style": "unstaged_hollow"
1463  }
1464}
1465```
1466
1467**Options**
1468
14691. Disable inline git blame:
1470
1471```json
1472{
1473  "git": {
1474    "inline_blame": {
1475      "enabled": false
1476    }
1477  }
1478}
1479```
1480
14812. Only show inline git blame after a delay (that starts after cursor stops moving):
1482
1483```json
1484{
1485  "git": {
1486    "inline_blame": {
1487      "enabled": true,
1488      "delay_ms": 500
1489    }
1490  }
1491}
1492```
1493
14943. Show a commit summary next to the commit date and author:
1495
1496```json
1497{
1498  "git": {
1499    "inline_blame": {
1500      "enabled": true,
1501      "show_commit_summary": true
1502    }
1503  }
1504}
1505```
1506
15074. Use this as the minimum column at which to display inline blame information:
1508
1509```json
1510{
1511  "git": {
1512    "inline_blame": {
1513      "enabled": true,
1514      "min_column": 80
1515    }
1516  }
1517}
1518```
1519
1520## Indent Guides
1521
1522- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1523- Setting: `indent_guides`
1524- Default:
1525
1526```json
1527{
1528  "indent_guides": {
1529    "enabled": true,
1530    "line_width": 1,
1531    "active_line_width": 1,
1532    "coloring": "fixed",
1533    "background_coloring": "disabled"
1534  }
1535}
1536```
1537
1538**Options**
1539
15401. Disable indent guides
1541
1542```json
1543{
1544  "indent_guides": {
1545    "enabled": false
1546  }
1547}
1548```
1549
15502. Enable indent guides for a specific language.
1551
1552```json
1553{
1554  "languages": {
1555    "Python": {
1556      "indent_guides": {
1557        "enabled": true
1558      }
1559    }
1560  }
1561}
1562```
1563
15643. Enable indent aware coloring ("rainbow indentation").
1565   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.
1566
1567```json
1568{
1569  "indent_guides": {
1570    "enabled": true,
1571    "coloring": "indent_aware"
1572  }
1573}
1574```
1575
15764. Enable indent aware background coloring ("rainbow indentation").
1577   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.
1578
1579```json
1580{
1581  "indent_guides": {
1582    "enabled": true,
1583    "coloring": "indent_aware",
1584    "background_coloring": "indent_aware"
1585  }
1586}
1587```
1588
1589## Hard Tabs
1590
1591- Description: Whether to indent lines using tab characters or multiple spaces.
1592- Setting: `hard_tabs`
1593- Default: `false`
1594
1595**Options**
1596
1597`boolean` values
1598
1599## Hover Popover Enabled
1600
1601- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1602- Setting: `hover_popover_enabled`
1603- Default: `true`
1604
1605**Options**
1606
1607`boolean` values
1608
1609## Icon Theme
1610
1611- Description: The icon theme setting can be specified in two forms - either as the name of an icon theme or as an object containing the `mode`, `dark`, and `light` icon themes for files/folders inside Zed.
1612- Setting: `icon_theme`
1613- Default: `Zed (Default)`
1614
1615### Icon Theme Object
1616
1617- Description: Specify the icon theme using an object that includes the `mode`, `dark`, and `light`.
1618- Setting: `icon_theme`
1619- Default:
1620
1621```json
1622"icon_theme": {
1623  "mode": "system",
1624  "dark": "Zed (Default)",
1625  "light": "Zed (Default)"
1626},
1627```
1628
1629### Mode
1630
1631- Description: Specify the icon theme mode.
1632- Setting: `mode`
1633- Default: `system`
1634
1635**Options**
1636
16371. Set the icon theme to dark mode
1638
1639```json
1640{
1641  "mode": "dark"
1642}
1643```
1644
16452. Set the icon theme to light mode
1646
1647```json
1648{
1649  "mode": "light"
1650}
1651```
1652
16533. Set the icon theme to system mode
1654
1655```json
1656{
1657  "mode": "system"
1658}
1659```
1660
1661### Dark
1662
1663- Description: The name of the dark icon theme.
1664- Setting: `dark`
1665- Default: `Zed (Default)`
1666
1667**Options**
1668
1669Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
1670
1671### Light
1672
1673- Description: The name of the light icon theme.
1674- Setting: `light`
1675- Default: `Zed (Default)`
1676
1677**Options**
1678
1679Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
1680
1681## Inlay hints
1682
1683- Description: Configuration for displaying extra text with hints in the editor.
1684- Setting: `inlay_hints`
1685- Default:
1686
1687```json
1688"inlay_hints": {
1689  "enabled": false,
1690  "show_type_hints": true,
1691  "show_parameter_hints": true,
1692  "show_other_hints": true,
1693  "show_background": false,
1694  "edit_debounce_ms": 700,
1695  "scroll_debounce_ms": 50,
1696  "toggle_on_modifiers_press": null
1697}
1698```
1699
1700**Options**
1701
1702Inlay hints querying consists of two parts: editor (client) and LSP server.
1703With 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.
1704At 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.
1705
1706The following languages have inlay hints preconfigured by Zed:
1707
1708- [Go](https://docs.zed.dev/languages/go)
1709- [Rust](https://docs.zed.dev/languages/rust)
1710- [Svelte](https://docs.zed.dev/languages/svelte)
1711- [Typescript](https://docs.zed.dev/languages/typescript)
1712
1713Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
1714
1715Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
1716Settings-related hint updates are not debounced.
1717
1718All possible config values for `toggle_on_modifiers_press` are:
1719
1720```json
1721"inlay_hints": {
1722  "toggle_on_modifiers_press": {
1723    "control": true,
1724    "shift": true,
1725    "alt": true,
1726    "platform": true,
1727    "function": true
1728  }
1729}
1730```
1731
1732Unspecified values have a `false` value, hints won't be toggled if all the modifiers are `false` or not all the modifiers are pressed.
1733
1734## Journal
1735
1736- Description: Configuration for the journal.
1737- Setting: `journal`
1738- Default:
1739
1740```json
1741"journal": {
1742  "path": "~",
1743  "hour_format": "hour12"
1744}
1745```
1746
1747### Path
1748
1749- Description: The path of the directory where journal entries are stored.
1750- Setting: `path`
1751- Default: `~`
1752
1753**Options**
1754
1755`string` values
1756
1757### Hour Format
1758
1759- Description: The format to use for displaying hours in the journal.
1760- Setting: `hour_format`
1761- Default: `hour12`
1762
1763**Options**
1764
17651. 12-hour format:
1766
1767```json
1768{
1769  "hour_format": "hour12"
1770}
1771```
1772
17732. 24-hour format:
1774
1775```json
1776{
1777  "hour_format": "hour24"
1778}
1779```
1780
1781## Languages
1782
1783- Description: Configuration for specific languages.
1784- Setting: `languages`
1785- Default: `null`
1786
1787**Options**
1788
1789To override settings for a language, add an entry for that languages name to the `languages` value. Example:
1790
1791```json
1792"languages": {
1793  "C": {
1794    "format_on_save": "off",
1795    "preferred_line_length": 64,
1796    "soft_wrap": "preferred_line_length"
1797  },
1798  "JSON": {
1799    "tab_size": 4
1800  }
1801}
1802```
1803
1804The following settings can be overridden for each specific language:
1805
1806- [`enable_language_server`](#enable-language-server)
1807- [`ensure_final_newline_on_save`](#ensure-final-newline-on-save)
1808- [`format_on_save`](#format-on-save)
1809- [`formatter`](#formatter)
1810- [`hard_tabs`](#hard-tabs)
1811- [`preferred_line_length`](#preferred-line-length)
1812- [`remove_trailing_whitespace_on_save`](#remove-trailing-whitespace-on-save)
1813- [`show_edit_predictions`](#show-edit-predictions)
1814- [`show_whitespaces`](#show-whitespaces)
1815- [`soft_wrap`](#soft-wrap)
1816- [`tab_size`](#tab-size)
1817- [`use_autoclose`](#use-autoclose)
1818- [`always_treat_brackets_as_autoclosed`](#always-treat-brackets-as-autoclosed)
1819
1820These values take in the same options as the root-level settings with the same name.
1821
1822## Network Proxy
1823
1824- Description: Configure a network proxy for Zed.
1825- Setting: `proxy`
1826- Default: `null`
1827
1828**Options**
1829
1830The proxy setting must contain a URL to the proxy.
1831
1832The following URI schemes are supported:
1833
1834- `http`
1835- `https`
1836- `socks4` - SOCKS4 proxy with local DNS
1837- `socks4a` - SOCKS4 proxy with remote DNS
1838- `socks5` - SOCKS5 proxy with local DNS
1839- `socks5h` - SOCKS5 proxy with remote DNS
1840
1841`http` will be used when no scheme is specified.
1842
1843By 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`.
1844
1845For example, to set an `http` proxy, add the following to your settings:
1846
1847```json
1848{
1849  "proxy": "http://127.0.0.1:10809"
1850}
1851```
1852
1853Or to set a `socks5` proxy:
1854
1855```json
1856{
1857  "proxy": "socks5h://localhost:10808"
1858}
1859```
1860
1861## Preview tabs
1862
1863- Description:
1864  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. \
1865   There are several ways to convert a preview tab into a regular tab:
1866
1867  - Double-clicking on the file
1868  - Double-clicking on the tab header
1869  - Using the `project_panel::OpenPermanent` action
1870  - Editing the file
1871  - Dragging the file to a different pane
1872
1873- Setting: `preview_tabs`
1874- Default:
1875
1876```json
1877"preview_tabs": {
1878  "enabled": true,
1879  "enable_preview_from_file_finder": false,
1880  "enable_preview_from_code_navigation": false,
1881}
1882```
1883
1884### Enable preview from file finder
1885
1886- Description: Determines whether to open files in preview mode when selected from the file finder.
1887- Setting: `enable_preview_from_file_finder`
1888- Default: `false`
1889
1890**Options**
1891
1892`boolean` values
1893
1894### Enable preview from code navigation
1895
1896- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
1897- Setting: `enable_preview_from_code_navigation`
1898- Default: `false`
1899
1900**Options**
1901
1902`boolean` values
1903
1904## File Finder
1905
1906### Modal Max Width
1907
1908- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
1909- Setting: `modal_max_width`
1910- Default: `small`
1911
1912## Preferred Line Length
1913
1914- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
1915- Setting: `preferred_line_length`
1916- Default: `80`
1917
1918**Options**
1919
1920`integer` values
1921
1922## Projects Online By Default
1923
1924- Description: Whether or not to show the online projects view by default.
1925- Setting: `projects_online_by_default`
1926- Default: `true`
1927
1928**Options**
1929
1930`boolean` values
1931
1932## Remove Trailing Whitespace On Save
1933
1934- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
1935- Setting: `remove_trailing_whitespace_on_save`
1936- Default: `true`
1937
1938**Options**
1939
1940`boolean` values
1941
1942## Search
1943
1944- Description: Search options to enable by default when opening new project and buffer searches.
1945- Setting: `search`
1946- Default:
1947
1948```json
1949"search": {
1950  "whole_word": false,
1951  "case_sensitive": false,
1952  "include_ignored": false,
1953  "regex": false
1954},
1955```
1956
1957## Seed Search Query From Cursor
1958
1959- Description: When to populate a new search's query based on the text under the cursor.
1960- Setting: `seed_search_query_from_cursor`
1961- Default: `always`
1962
1963**Options**
1964
19651. `always` always populate the search query with the word under the cursor
19662. `selection` only populate the search query when there is text selected
19673. `never` never populate the search query
1968
1969## Use Smartcase Search
1970
1971- 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. \
1972  This applies to both in-file searches and project-wide searches.
1973
1974  Examples:
1975
1976  - Searching for "function" would match "function", "Function", "FUNCTION", etc.
1977  - Searching for "Function" would only match "Function", not "function" or "FUNCTION"
1978
1979- Setting: `use_smartcase_search`
1980- Default: `false`
1981
1982**Options**
1983
1984`boolean` values
1985
1986## Show Call Status Icon
1987
1988- Description: Whether or not to show the call status icon in the status bar.
1989- Setting: `show_call_status_icon`
1990- Default: `true`
1991
1992**Options**
1993
1994`boolean` values
1995
1996## Show Completions On Input
1997
1998- Description: Whether or not to show completions as you type.
1999- Setting: `show_completions_on_input`
2000- Default: `true`
2001
2002**Options**
2003
2004`boolean` values
2005
2006## Show Completion Documentation
2007
2008- Description: Whether to display inline and alongside documentation for items in the completions menu.
2009- Setting: `show_completion_documentation`
2010- Default: `true`
2011
2012**Options**
2013
2014`boolean` values
2015
2016## Show Edit Predictions
2017
2018- Description: Whether to show edit predictions as you type or manually by triggering `editor::ShowEditPrediction`.
2019- Setting: `show_edit_predictions`
2020- Default: `true`
2021
2022**Options**
2023
2024`boolean` values
2025
2026## Show Whitespaces
2027
2028- Description: Whether or not to show render whitespace characters in the editor.
2029- Setting: `show_whitespaces`
2030- Default: `selection`
2031
2032**Options**
2033
20341. `all`
20352. `selection`
20363. `none`
20374. `boundary`
2038
2039## Soft Wrap
2040
2041- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
2042- Setting: `soft_wrap`
2043- Default: `none`
2044
2045**Options**
2046
20471. `none` to avoid wrapping generally, unless the line is too long
20482. `prefer_line` (deprecated, same as `none`)
20493. `editor_width` to wrap lines that overflow the editor width
20504. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
20515. `bounded` to wrap lines at the minimum of `editor_width` and `preferred_line_length`
2052
2053## Wrap Guides (Vertical Rulers)
2054
2055- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
2056- Setting: `wrap_guides`
2057- Default: []
2058
2059**Options**
2060
2061List of `integer` column numbers
2062
2063## Tab Size
2064
2065- Description: The number of spaces to use for each tab character.
2066- Setting: `tab_size`
2067- Default: `4`
2068
2069**Options**
2070
2071`integer` values
2072
2073## Telemetry
2074
2075- Description: Control what info is collected by Zed.
2076- Setting: `telemetry`
2077- Default:
2078
2079```json
2080"telemetry": {
2081  "diagnostics": true,
2082  "metrics": true
2083},
2084```
2085
2086**Options**
2087
2088### Diagnostics
2089
2090- Description: Setting for sending debug-related data, such as crash reports.
2091- Setting: `diagnostics`
2092- Default: `true`
2093
2094**Options**
2095
2096`boolean` values
2097
2098### Metrics
2099
2100- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
2101- Setting: `metrics`
2102- Default: `true`
2103
2104**Options**
2105
2106`boolean` values
2107
2108## Terminal
2109
2110- Description: Configuration for the terminal.
2111- Setting: `terminal`
2112- Default:
2113
2114```json
2115{
2116  "terminal": {
2117    "alternate_scroll": "off",
2118    "blinking": "terminal_controlled",
2119    "copy_on_select": false,
2120    "dock": "bottom",
2121    "detect_venv": {
2122      "on": {
2123        "directories": [".env", "env", ".venv", "venv"],
2124        "activate_script": "default"
2125      }
2126    },
2127    "env": {},
2128    "font_family": null,
2129    "font_features": null,
2130    "font_size": null,
2131    "line_height": "comfortable",
2132    "option_as_meta": false,
2133    "button": false,
2134    "shell": {},
2135    "toolbar": {
2136      "breadcrumbs": true
2137    },
2138    "working_directory": "current_project_directory",
2139    "scrollbar": {
2140      "show": null
2141    }
2142  }
2143}
2144```
2145
2146### Terminal: Dock
2147
2148- Description: Control the position of the dock
2149- Setting: `dock`
2150- Default: `bottom`
2151
2152**Options**
2153
2154`"bottom"`, `"left"` or `"right"`
2155
2156### Terminal: Alternate Scroll
2157
2158- 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.
2159- Setting: `alternate_scroll`
2160- Default: `off`
2161
2162**Options**
2163
21641. Default alternate scroll mode to on
2165
2166```json
2167{
2168  "terminal": {
2169    "alternate_scroll": "on"
2170  }
2171}
2172```
2173
21742. Default alternate scroll mode to off
2175
2176```json
2177{
2178  "terminal": {
2179    "alternate_scroll": "off"
2180  }
2181}
2182```
2183
2184### Terminal: Blinking
2185
2186- Description: Set the cursor blinking behavior in the terminal
2187- Setting: `blinking`
2188- Default: `terminal_controlled`
2189
2190**Options**
2191
21921. Never blink the cursor, ignore the terminal mode
2193
2194```json
2195{
2196  "terminal": {
2197    "blinking": "off"
2198  }
2199}
2200```
2201
22022. Default the cursor blink to off, but allow the terminal to turn blinking on
2203
2204```json
2205{
2206  "terminal": {
2207    "blinking": "terminal_controlled"
2208  }
2209}
2210```
2211
22123. Always blink the cursor, ignore the terminal mode
2213
2214```json
2215{
2216  "terminal": {
2217    "blinking": "on"
2218  }
2219}
2220```
2221
2222### Terminal: Copy On Select
2223
2224- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
2225- Setting: `copy_on_select`
2226- Default: `false`
2227
2228**Options**
2229
2230`boolean` values
2231
2232**Example**
2233
2234```json
2235{
2236  "terminal": {
2237    "copy_on_select": true
2238  }
2239}
2240```
2241
2242### Terminal: Env
2243
2244- 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
2245- Setting: `env`
2246- Default: `{}`
2247
2248**Example**
2249
2250```json
2251{
2252  "terminal": {
2253    "env": {
2254      "ZED": "1",
2255      "KEY": "value1:value2"
2256    }
2257  }
2258}
2259```
2260
2261### Terminal: Font Size
2262
2263- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
2264- Setting: `font_size`
2265- Default: `null`
2266
2267**Options**
2268
2269`integer` values
2270
2271```json
2272{
2273  "terminal": {
2274    "font_size": 15
2275  }
2276}
2277```
2278
2279### Terminal: Font Family
2280
2281- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
2282- Setting: `font_family`
2283- Default: `null`
2284
2285**Options**
2286
2287The name of any font family installed on the user's system
2288
2289```json
2290{
2291  "terminal": {
2292    "font_family": "Berkeley Mono"
2293  }
2294}
2295```
2296
2297### Terminal: Font Features
2298
2299- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
2300- Setting: `font_features`
2301- Default: `null`
2302- Platform: macOS and Windows.
2303
2304**Options**
2305
2306See Buffer Font Features
2307
2308```json
2309{
2310  "terminal": {
2311    "font_features": {
2312      "calt": false
2313      // See Buffer Font Features for more features
2314    }
2315  }
2316}
2317```
2318
2319### Terminal: Line Height
2320
2321- Description: Set the terminal's line height.
2322- Setting: `line_height`
2323- Default: `comfortable`
2324
2325**Options**
2326
23271. Use a line height that's `comfortable` for reading, 1.618. (default)
2328
2329```json
2330{
2331  "terminal": {
2332    "line_height": "comfortable"
2333  }
2334}
2335```
2336
23372. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
2338
2339```json
2340{
2341  "terminal": {
2342    "line_height": "standard"
2343  }
2344}
2345```
2346
23473.  Use a custom line height.
2348
2349```json
2350{
2351  "terminal": {
2352    "line_height": {
2353      "custom": 2
2354    }
2355  }
2356}
2357```
2358
2359### Terminal: Option As Meta
2360
2361- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
2362- Setting: `option_as_meta`
2363- Default: `false`
2364
2365**Options**
2366
2367`boolean` values
2368
2369```json
2370{
2371  "terminal": {
2372    "option_as_meta": true
2373  }
2374}
2375```
2376
2377### Terminal: Shell
2378
2379- Description: What shell to use when launching the terminal.
2380- Setting: `shell`
2381- Default: `system`
2382
2383**Options**
2384
23851. Use the system's default terminal configuration (usually the `/etc/passwd` file).
2386
2387```json
2388{
2389  "terminal": {
2390    "shell": "system"
2391  }
2392}
2393```
2394
23952. A program to launch:
2396
2397```json
2398{
2399  "terminal": {
2400    "shell": {
2401      "program": "sh"
2402    }
2403  }
2404}
2405```
2406
24073. A program with arguments:
2408
2409```json
2410{
2411  "terminal": {
2412    "shell": {
2413      "with_arguments": {
2414        "program": "/bin/bash",
2415        "args": ["--login"]
2416      }
2417    }
2418  }
2419}
2420```
2421
2422## Terminal: Detect Virtual Environments {#terminal-detect_venv}
2423
2424- 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.
2425- Setting: `detect_venv`
2426- Default:
2427
2428```json
2429{
2430  "terminal": {
2431    "detect_venv": {
2432      "on": {
2433        // Default directories to search for virtual environments, relative
2434        // to the current working directory. We recommend overriding this
2435        // in your project's settings, rather than globally.
2436        "directories": [".venv", "venv"],
2437        // Can also be `csh`, `fish`, and `nushell`
2438        "activate_script": "default"
2439      }
2440    }
2441  }
2442}
2443```
2444
2445Disable with:
2446
2447```json
2448{
2449  "terminal": {
2450    "detect_venv": "off"
2451  }
2452}
2453```
2454
2455## Terminal: Toolbar
2456
2457- Description: Whether or not to show various elements in the terminal toolbar.
2458- Setting: `toolbar`
2459- Default:
2460
2461```json
2462{
2463  "terminal": {
2464    "toolbar": {
2465      "breadcrumbs": true
2466    }
2467  }
2468}
2469```
2470
2471**Options**
2472
2473At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
2474
2475If the terminal title is empty, the breadcrumbs won't be shown.
2476
2477The shell running in the terminal needs to be configured to emit the title.
2478
2479Example command to set the title: `echo -e "\e]2;New Title\007";`
2480
2481### Terminal: Button
2482
2483- Description: Control to show or hide the terminal button in the status bar
2484- Setting: `button`
2485- Default: `true`
2486
2487**Options**
2488
2489`boolean` values
2490
2491```json
2492{
2493  "terminal": {
2494    "button": false
2495  }
2496}
2497```
2498
2499### Terminal: Working Directory
2500
2501- Description: What working directory to use when launching the terminal.
2502- Setting: `working_directory`
2503- Default: `"current_project_directory"`
2504
2505**Options**
2506
25071. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
2508
2509```json
2510{
2511  "terminal": {
2512    "working_directory": "current_project_directory"
2513  }
2514}
2515```
2516
25172. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
2518
2519```json
2520{
2521  "terminal": {
2522    "working_directory": "first_project_directory"
2523  }
2524}
2525```
2526
25273. Always use this platform's home directory (if we can find it)
2528
2529```json
2530{
2531  "terminal": {
2532    "working_directory": "always_home"
2533  }
2534}
2535```
2536
25374. 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.
2538
2539```json
2540{
2541  "terminal": {
2542    "working_directory": {
2543      "always": {
2544        "directory": "~/zed/projects/"
2545      }
2546    }
2547  }
2548}
2549```
2550
2551## Theme
2552
2553- 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.
2554- Setting: `theme`
2555- Default: `One Dark`
2556
2557### Theme Object
2558
2559- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
2560- Setting: `theme`
2561- Default:
2562
2563```json
2564"theme": {
2565  "mode": "system",
2566  "dark": "One Dark",
2567  "light": "One Light"
2568},
2569```
2570
2571### Mode
2572
2573- Description: Specify theme mode.
2574- Setting: `mode`
2575- Default: `system`
2576
2577**Options**
2578
25791. Set the theme to dark mode
2580
2581```json
2582{
2583  "mode": "dark"
2584}
2585```
2586
25872. Set the theme to light mode
2588
2589```json
2590{
2591  "mode": "light"
2592}
2593```
2594
25953. Set the theme to system mode
2596
2597```json
2598{
2599  "mode": "system"
2600}
2601```
2602
2603### Dark
2604
2605- Description: The name of the dark Zed theme to use for the UI.
2606- Setting: `dark`
2607- Default: `One Dark`
2608
2609**Options**
2610
2611Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2612
2613### Light
2614
2615- Description: The name of the light Zed theme to use for the UI.
2616- Setting: `light`
2617- Default: `One Light`
2618
2619**Options**
2620
2621Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
2622
2623## Vim
2624
2625- Description: Whether or not to enable vim mode (work in progress).
2626- Setting: `vim_mode`
2627- Default: `false`
2628
2629## Project Panel
2630
2631- Description: Customize project panel
2632- Setting: `project_panel`
2633- Default:
2634
2635```json
2636{
2637  "project_panel": {
2638    "button": true,
2639    "default_width": 240,
2640    "dock": "left",
2641    "entry_spacing": "comfortable",
2642    "file_icons": true,
2643    "folder_icons": true,
2644    "git_status": true,
2645    "indent_size": 20,
2646    "auto_reveal_entries": true,
2647    "auto_fold_dirs": true,
2648    "scrollbar": {
2649      "show": null
2650    },
2651    "indent_guides": {
2652      "show": "always"
2653    }
2654  }
2655}
2656```
2657
2658### Dock
2659
2660- Description: Control the position of the dock
2661- Setting: `dock`
2662- Default: `left`
2663
2664**Options**
2665
26661. Default dock position to left
2667
2668```json
2669{
2670  "dock": "left"
2671}
2672```
2673
26742. Default dock position to right
2675
2676```json
2677{
2678  "dock": "right"
2679}
2680```
2681
2682### Entry Spacing
2683
2684- Description: Spacing between worktree entries
2685- Setting: `entry_spacing`
2686- Default: `comfortable`
2687
2688**Options**
2689
26901. Comfortable entry spacing
2691
2692```json
2693{
2694  "entry_spacing": "comfortable"
2695}
2696```
2697
26982. Standard entry spacing
2699
2700```json
2701{
2702  "entry_spacing": "standard"
2703}
2704```
2705
2706### Git Status
2707
2708- Description: Indicates newly created and updated files
2709- Setting: `git_status`
2710- Default: `true`
2711
2712**Options**
2713
27141. Default enable git status
2715
2716```json
2717{
2718  "git_status": true
2719}
2720```
2721
27222. Default disable git status
2723
2724```json
2725{
2726  "git_status": false
2727}
2728```
2729
2730### Default Width
2731
2732- Description: Customize default width taken by project panel
2733- Setting: `default_width`
2734- Default: N/A width in pixels (eg: 420)
2735
2736**Options**
2737
2738`boolean` values
2739
2740### Auto Reveal Entries
2741
2742- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
2743- Setting: `auto_reveal_entries`
2744- Default: `true`
2745
2746**Options**
2747
27481. Enable auto reveal entries
2749
2750```json
2751{
2752  "auto_reveal_entries": true
2753}
2754```
2755
27562. Disable auto reveal entries
2757
2758```json
2759{
2760  "auto_reveal_entries": false
2761}
2762```
2763
2764### Auto Fold Dirs
2765
2766- Description: Whether to fold directories automatically when directory has only one directory inside.
2767- Setting: `auto_fold_dirs`
2768- Default: `true`
2769
2770**Options**
2771
27721. Enable auto fold dirs
2773
2774```json
2775{
2776  "auto_fold_dirs": true
2777}
2778```
2779
27802. Disable auto fold dirs
2781
2782```json
2783{
2784  "auto_fold_dirs": false
2785}
2786```
2787
2788### Indent Size
2789
2790- Description: Amount of indentation (in pixels) for nested items.
2791- Setting: `indent_size`
2792- Default: `20`
2793
2794### Indent Guides: Show
2795
2796- Description: Whether to show indent guides in the project panel. Possible values: "always", "never".
2797- Setting: `indent_guides`
2798
2799```json
2800"indent_guides": {
2801  "show": "always"
2802}
2803```
2804
2805**Options**
2806
28071. Show indent guides in the project panel
2808
2809```json
2810{
2811  "indent_guides": {
2812    "show": "always"
2813  }
2814}
2815```
2816
28172. Hide indent guides in the project panel
2818
2819```json
2820{
2821  "indent_guides": {
2822    "show": "never"
2823  }
2824}
2825```
2826
2827### Scrollbar: Show
2828
2829- 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.
2830- Setting: `scrollbar`
2831- Default:
2832
2833```json
2834"scrollbar": {
2835  "show": null
2836}
2837```
2838
2839**Options**
2840
28411. Show scrollbar in the project panel
2842
2843```json
2844{
2845  "scrollbar": {
2846    "show": "always"
2847  }
2848}
2849```
2850
28512. Hide scrollbar in the project panel
2852
2853```json
2854{
2855  "scrollbar": {
2856    "show": "never"
2857  }
2858}
2859```
2860
2861## Assistant Panel
2862
2863- Description: Customize assistant panel
2864- Setting: `assistant`
2865- Default:
2866
2867```json
2868"assistant": {
2869  "enabled": true,
2870  "button": true,
2871  "dock": "right",
2872  "default_width": 640,
2873  "default_height": 320,
2874  "provider": "openai",
2875  "version": "1",
2876},
2877```
2878
2879## Outline Panel
2880
2881- Description: Customize outline Panel
2882- Setting: `outline_panel`
2883- Default:
2884
2885```json
2886"outline_panel": {
2887  "button": true,
2888  "default_width": 240,
2889  "dock": "left",
2890  "file_icons": true,
2891  "folder_icons": true,
2892  "git_status": true,
2893  "indent_size": 20,
2894  "auto_reveal_entries": true,
2895  "auto_fold_dirs": true,
2896  "indent_guides": {
2897    "show": "always"
2898  },
2899  "scrollbar": {
2900    "show": null
2901  }
2902}
2903```
2904
2905## Calls
2906
2907- Description: Customize behavior when participating in a call
2908- Setting: `calls`
2909- Default:
2910
2911```json
2912"calls": {
2913  // Join calls with the microphone live by default
2914  "mute_on_join": false,
2915  // Share your project when you are the first to join a channel
2916  "share_on_join": false
2917},
2918```
2919
2920## Unnecessary Code Fade
2921
2922- Description: How much to fade out unused code.
2923- Setting: `unnecessary_code_fade`
2924- Default: `0.3`
2925
2926**Options**
2927
2928Float values between `0.0` and `0.9`, where:
2929
2930- `0.0` means no fading (unused code looks the same as used code)
2931- `0.9` means maximum fading (unused code is very faint but still visible)
2932
2933**Example**
2934
2935```json
2936{
2937  "unnecessary_code_fade": 0.5
2938}
2939```
2940
2941## UI Font Family
2942
2943- Description: The name of the font to use for text in the UI.
2944- Setting: `ui_font_family`
2945- Default: `Zed Plex Sans`
2946
2947**Options**
2948
2949The name of any font family installed on the system.
2950
2951## UI Font Features
2952
2953- Description: The OpenType features to enable for text in the UI.
2954- Setting: `ui_font_features`
2955- Default: `null`
2956- Platform: macOS and Windows.
2957
2958**Options**
2959
2960Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
2961
2962For example, to disable font ligatures, add the following to your settings:
2963
2964```json
2965{
2966  "ui_font_features": {
2967    "calt": false
2968  }
2969}
2970```
2971
2972You can also set other OpenType features, like setting `cv01` to `7`:
2973
2974```json
2975{
2976  "ui_font_features": {
2977    "cv01": 7
2978  }
2979}
2980```
2981
2982## UI Font Fallbacks
2983
2984- Description: The font fallbacks to use for text in the UI.
2985- Setting: `ui_font_fallbacks`
2986- Default: `null`
2987- Platform: macOS and Windows.
2988
2989**Options**
2990
2991For example, to use `Nerd Font` as a fallback, add the following to your settings:
2992
2993```json
2994{
2995  "ui_font_fallbacks": ["Nerd Font"]
2996}
2997```
2998
2999## UI Font Size
3000
3001- Description: The default font size for text in the UI.
3002- Setting: `ui_font_size`
3003- Default: `16`
3004
3005**Options**
3006
3007`integer` values from `6` to `100` pixels (inclusive)
3008
3009## UI Font Weight
3010
3011- Description: The default font weight for text in the UI.
3012- Setting: `ui_font_weight`
3013- Default: `400`
3014
3015**Options**
3016
3017`integer` values between `100` and `900`
3018
3019## An example configuration:
3020
3021```json
3022// ~/.config/zed/settings.json
3023{
3024  "theme": "cave-light",
3025  "tab_size": 2,
3026  "preferred_line_length": 80,
3027  "soft_wrap": "none",
3028
3029  "buffer_font_size": 18,
3030  "buffer_font_family": "Zed Plex Mono",
3031
3032  "autosave": "on_focus_change",
3033  "format_on_save": "off",
3034  "vim_mode": false,
3035  "projects_online_by_default": true,
3036  "terminal": {
3037    "font_family": "FiraCode Nerd Font Mono",
3038    "blinking": "off"
3039  },
3040  "languages": {
3041    "C": {
3042      "format_on_save": "language_server",
3043      "preferred_line_length": 64,
3044      "soft_wrap": "preferred_line_length"
3045    }
3046  }
3047}
3048```