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
  34- Description: Styling settings applied to the active pane.
  35- Setting: `active_pane_modifiers`
  36- Default:
  37
  38```json
  39{
  40  "active_pane_modifiers": {
  41    "border_size": 0.0,
  42    "inactive_opacity": 1.0
  43  }
  44}
  45```
  46
  47### Border size
  48
  49- 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.
  50- Setting: `border_size`
  51- Default: `0.0`
  52
  53**Options**
  54
  55Non-negative `float` values
  56
  57### Inactive Opacity
  58
  59- 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.
  60- Setting: `inactive_opacity`
  61- Default: `1.0`
  62
  63**Options**
  64
  65`float` values
  66
  67## Bottom Dock Layout
  68
  69- Description: Control the layout of the bottom dock, relative to the left and right docks
  70- Setting: `bottom_dock_layout`
  71- Default: `"contained"`
  72
  73**Options**
  74
  751. Contain the bottom dock, giving the full height of the window to the left and right docks
  76
  77```json
  78{
  79  "bottom_dock_layout": "contained"
  80}
  81```
  82
  832. Give the bottom dock the full width of the window, truncating the left and right docks
  84
  85```json
  86{
  87  "bottom_dock_layout": "full"
  88}
  89```
  90
  913. Left align the bottom dock, truncating the left dock and giving the right dock the full height of the window
  92
  93```json
  94{
  95  "bottom_dock_layout": "left_aligned"
  96}
  97```
  98
  993. Right align the bottom dock, giving the left dock the full height of the window and truncating the right dock.
 100
 101```json
 102{
 103  "bottom_dock_layout": "right_aligned"
 104}
 105```
 106
 107## Auto Install extensions
 108
 109- Description: Define extensions to be autoinstalled or never be installed.
 110- Setting: `auto_install_extension`
 111- Default: `{ "html": true }`
 112
 113**Options**
 114
 115You can find the names of your currently installed extensions by listing the subfolders under the [extension installation location](./extensions/installing-extensions.md#installation-location):
 116
 117On MacOS:
 118
 119```sh
 120ls ~/Library/Application\ Support/Zed/extensions/installed/
 121```
 122
 123On Linux:
 124
 125```sh
 126ls ~/.local/share/zed/extensions/installed
 127```
 128
 129Define extensions which should be installed (`true`) or never installed (`false`).
 130
 131```json
 132{
 133  "auto_install_extensions": {
 134    "html": true,
 135    "dockerfile": true,
 136    "docker-compose": false
 137  }
 138}
 139```
 140
 141## Autosave
 142
 143- Description: When to automatically save edited buffers.
 144- Setting: `autosave`
 145- Default: `off`
 146
 147**Options**
 148
 1491. To disable autosave, set it to `off`:
 150
 151```json
 152{
 153  "autosave": "off"
 154}
 155```
 156
 1572. To autosave when focus changes, use `on_focus_change`:
 158
 159```json
 160{
 161  "autosave": "on_focus_change"
 162}
 163```
 164
 1653. To autosave when the active window changes, use `on_window_change`:
 166
 167```json
 168{
 169  "autosave": "on_window_change"
 170}
 171```
 172
 1734. To autosave after an inactivity period, use `after_delay`:
 174
 175```json
 176{
 177  "autosave": {
 178    "after_delay": {
 179      "milliseconds": 1000
 180    }
 181  }
 182}
 183```
 184
 185## Restore on Startup
 186
 187- Description: Controls session restoration on startup.
 188- Setting: `restore_on_startup`
 189- Default: `last_session`
 190
 191**Options**
 192
 1931. Restore all workspaces that were open when quitting Zed:
 194
 195```json
 196{
 197  "restore_on_startup": "last_session"
 198}
 199```
 200
 2012. Restore the workspace that was closed last:
 202
 203```json
 204{
 205  "restore_on_startup": "last_workspace"
 206}
 207```
 208
 2093. Always start with an empty editor:
 210
 211```json
 212{
 213  "restore_on_startup": "none"
 214}
 215```
 216
 217## Autoscroll on Clicks
 218
 219- Description: Whether to scroll when clicking near the edge of the visible text area.
 220- Setting: `autoscroll_on_clicks`
 221- Default: `false`
 222
 223**Options**
 224
 225`boolean` values
 226
 227## Auto Update
 228
 229- Description: Whether or not to automatically check for updates.
 230- Setting: `auto_update`
 231- Default: `true`
 232
 233**Options**
 234
 235`boolean` values
 236
 237## Base Keymap
 238
 239- Description: Base key bindings scheme. Base keymaps can be overridden with user keymaps.
 240- Setting: `base_keymap`
 241- Default: `VSCode`
 242
 243**Options**
 244
 2451. VSCode
 246
 247```json
 248{
 249  "base_keymap": "VSCode"
 250}
 251```
 252
 2532. Atom
 254
 255```json
 256{
 257  "base_keymap": "Atom"
 258}
 259```
 260
 2613. JetBrains
 262
 263```json
 264{
 265  "base_keymap": "JetBrains"
 266}
 267```
 268
 2694. None
 270
 271```json
 272{
 273  "base_keymap": "None"
 274}
 275```
 276
 2775. SublimeText
 278
 279```json
 280{
 281  "base_keymap": "SublimeText"
 282}
 283```
 284
 2856. TextMate
 286
 287```json
 288{
 289  "base_keymap": "TextMate"
 290}
 291```
 292
 293## Buffer Font Family
 294
 295- Description: The name of a font to use for rendering text in the editor.
 296- Setting: `buffer_font_family`
 297- Default: `Zed Plex Mono`
 298
 299**Options**
 300
 301The name of any font family installed on the user's system
 302
 303## Buffer Font Features
 304
 305- Description: The OpenType features to enable for text in the editor.
 306- Setting: `buffer_font_features`
 307- Default: `null`
 308- Platform: macOS and Windows.
 309
 310**Options**
 311
 312Zed 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.
 313
 314For example, to disable font ligatures, add the following to your settings:
 315
 316```json
 317{
 318  "buffer_font_features": {
 319    "calt": false
 320  }
 321}
 322```
 323
 324You can also set other OpenType features, like setting `cv01` to `7`:
 325
 326```json
 327{
 328  "buffer_font_features": {
 329    "cv01": 7
 330  }
 331}
 332```
 333
 334## Buffer Font Fallbacks
 335
 336- Description: Set the buffer text's font fallbacks, this will be merged with the platform's default fallbacks.
 337- Setting: `buffer_font_fallbacks`
 338- Default: `null`
 339- Platform: macOS and Windows.
 340
 341**Options**
 342
 343For example, to use `Nerd Font` as a fallback, add the following to your settings:
 344
 345```json
 346{
 347  "buffer_font_fallbacks": ["Nerd Font"]
 348}
 349```
 350
 351## Buffer Font Size
 352
 353- Description: The default font size for text in the editor.
 354- Setting: `buffer_font_size`
 355- Default: `15`
 356
 357**Options**
 358
 359`integer` values from `6` to `100` pixels (inclusive)
 360
 361## Buffer Font Weight
 362
 363- Description: The default font weight for text in the editor.
 364- Setting: `buffer_font_weight`
 365- Default: `400`
 366
 367**Options**
 368
 369`integer` values between `100` and `900`
 370
 371## Buffer Line Height
 372
 373- Description: The default line height for text in the editor.
 374- Setting: `buffer_line_height`
 375- Default: `"comfortable"`
 376
 377**Options**
 378
 379`"standard"`, `"comfortable"` or `{ "custom": float }` (`1` is compact, `2` is loose)
 380
 381## Close on File Delete
 382
 383- Description: Whether to automatically close editor tabs when their corresponding files are deleted from disk.
 384- Setting: `close_on_file_delete`
 385- Default: `false`
 386
 387**Options**
 388
 389`boolean` values
 390
 391When enabled, this setting will automatically close tabs for files that have been deleted from the file system. This is particularly useful for workflows involving temporary or scratch files that are frequently created and deleted. When disabled (default), deleted files remain open with a strikethrough through their tab title.
 392
 393Note: Dirty files (files with unsaved changes) will not be automatically closed even when this setting is enabled, ensuring you don't lose unsaved work.
 394
 395## Confirm Quit
 396
 397- Description: Whether or not to prompt the user to confirm before closing the application.
 398- Setting: `confirm_quit`
 399- Default: `false`
 400
 401**Options**
 402
 403`boolean` values
 404
 405## Centered Layout
 406
 407- Description: Configuration for the centered layout mode.
 408- Setting: `centered_layout`
 409- Default:
 410
 411```json
 412"centered_layout": {
 413  "left_padding": 0.2,
 414  "right_padding": 0.2,
 415}
 416```
 417
 418**Options**
 419
 420The `left_padding` and `right_padding` options define the relative width of the
 421left 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`.
 422
 423## Direnv Integration
 424
 425- Description: Settings for [direnv](https://direnv.net/) integration. Requires `direnv` to be installed.
 426  `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.
 427  It also allows for those environment variables to be used in tasks.
 428- Setting: `load_direnv`
 429- Default: `"direct"`
 430
 431**Options**
 432
 433There are two options to choose from:
 434
 4351. `shell_hook`: Use the shell hook to load direnv. This relies on direnv to activate upon entering the directory. Supports POSIX shells and fish.
 4362. `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.
 437
 438## Edit Predictions
 439
 440- Description: Settings for edit predictions.
 441- Setting: `edit_predictions`
 442- Default:
 443
 444```json
 445  "edit_predictions": {
 446    "disabled_globs": [
 447      "**/.env*",
 448      "**/*.pem",
 449      "**/*.key",
 450      "**/*.cert",
 451      "**/*.crt",
 452      "**/.dev.vars",
 453      "**/secrets.yml"
 454    ]
 455  }
 456```
 457
 458**Options**
 459
 460### Disabled Globs
 461
 462- 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.
 463- Setting: `disabled_globs`
 464- Default: `["**/.env*", "**/*.pem", "**/*.key", "**/*.cert", "**/*.crt", "**/.dev.vars", "**/secrets.yml"]`
 465
 466**Options**
 467
 468List of `string` values.
 469
 470## Edit Predictions Disabled in
 471
 472- Description: A list of language scopes in which edit predictions should be disabled.
 473- Setting: `edit_predictions_disabled_in`
 474- Default: `[]`
 475
 476**Options**
 477
 478List of `string` values
 479
 4801. Don't show edit predictions in comments:
 481
 482```json
 483"disabled_in": ["comment"]
 484```
 485
 4862. Don't show edit predictions in strings and comments:
 487
 488```json
 489"disabled_in": ["comment", "string"]
 490```
 491
 4923. Only in Go, don't show edit predictions in strings and comments:
 493
 494```json
 495{
 496  "languages": {
 497    "Go": {
 498      "edit_predictions_disabled_in": ["comment", "string"]
 499    }
 500  }
 501}
 502```
 503
 504## Current Line Highlight
 505
 506- Description: How to highlight the current line in the editor.
 507- Setting: `current_line_highlight`
 508- Default: `all`
 509
 510**Options**
 511
 5121. Don't highlight the current line:
 513
 514```json
 515"current_line_highlight": "none"
 516```
 517
 5182. Highlight the gutter area:
 519
 520```json
 521"current_line_highlight": "gutter"
 522```
 523
 5243. Highlight the editor area:
 525
 526```json
 527"current_line_highlight": "line"
 528```
 529
 5304. Highlight the full line:
 531
 532```json
 533"current_line_highlight": "all"
 534```
 535
 536## Selection Highlight
 537
 538- Description: Whether to highlight all occurrences of the selected text in an editor.
 539- Setting: `selection_highlight`
 540- Default: `true`
 541
 542## LSP Highlight Debounce
 543
 544- Description: The debounce delay before querying highlights from the language server based on the current cursor location.
 545- Setting: `lsp_highlight_debounce`
 546- Default: `75`
 547
 548## Cursor Blink
 549
 550- Description: Whether or not the cursor blinks.
 551- Setting: `cursor_blink`
 552- Default: `true`
 553
 554**Options**
 555
 556`boolean` values
 557
 558## Cursor Shape
 559
 560- Description: Cursor shape for the default editor.
 561- Setting: `cursor_shape`
 562- Default: `bar`
 563
 564**Options**
 565
 5661. A vertical bar:
 567
 568```json
 569"cursor_shape": "bar"
 570```
 571
 5722. A block that surrounds the following character:
 573
 574```json
 575"cursor_shape": "block"
 576```
 577
 5783. An underline / underscore that runs along the following character:
 579
 580```json
 581"cursor_shape": "underline"
 582```
 583
 5844. An box drawn around the following character:
 585
 586```json
 587"cursor_shape": "hollow"
 588```
 589
 590## Hide Mouse
 591
 592- Description: Determines when the mouse cursor should be hidden in an editor or input box.
 593- Setting: `hide_mouse`
 594- Default: `on_typing_and_movement`
 595
 596**Options**
 597
 5981. Never hide the mouse cursor:
 599
 600```json
 601"hide_mouse": "never"
 602```
 603
 6042. Hide only when typing:
 605
 606```json
 607"hide_mouse": "on_typing"
 608```
 609
 6103. Hide on both typing and cursor movement:
 611
 612```json
 613"hide_mouse": "on_typing_and_movement"
 614```
 615
 616## Snippet Sort Order
 617
 618- Description: Determines how snippets are sorted relative to other completion items.
 619- Setting: `snippet_sort_order`
 620- Default: `inline`
 621
 622**Options**
 623
 6241. Place snippets at the top of the completion list:
 625
 626```json
 627"snippet_sort_order": "top"
 628```
 629
 6302. Place snippets normally without any preference:
 631
 632```json
 633"snippet_sort_order": "inline"
 634```
 635
 6363. Place snippets at the bottom of the completion list:
 637
 638```json
 639"snippet_sort_order": "bottom"
 640```
 641
 6424. Do not show snippets in the completion list at all:
 643
 644```json
 645"snippet_sort_order": "none"
 646```
 647
 648## Editor Scrollbar
 649
 650- Description: Whether or not to show the editor scrollbar and various elements in it.
 651- Setting: `scrollbar`
 652- Default:
 653
 654```json
 655"scrollbar": {
 656  "show": "auto",
 657  "cursors": true,
 658  "git_diff": true,
 659  "search_results": true,
 660  "selected_text": true,
 661  "selected_symbol": true,
 662  "diagnostics": "all",
 663  "axes": {
 664    "horizontal": true,
 665    "vertical": true,
 666  },
 667},
 668```
 669
 670### Show Mode
 671
 672- Description: When to show the editor scrollbar.
 673- Setting: `show`
 674- Default: `auto`
 675
 676**Options**
 677
 6781. Show the scrollbar if there's important information or follow the system's configured behavior:
 679
 680```json
 681"scrollbar": {
 682  "show": "auto"
 683}
 684```
 685
 6862. Match the system's configured behavior:
 687
 688```json
 689"scrollbar": {
 690  "show": "system"
 691}
 692```
 693
 6943. Always show the scrollbar:
 695
 696```json
 697"scrollbar": {
 698  "show": "always"
 699}
 700```
 701
 7024. Never show the scrollbar:
 703
 704```json
 705"scrollbar": {
 706  "show": "never"
 707}
 708```
 709
 710### Cursor Indicators
 711
 712- Description: Whether to show cursor positions in the scrollbar.
 713- Setting: `cursors`
 714- Default: `true`
 715
 716**Options**
 717
 718`boolean` values
 719
 720### Git Diff Indicators
 721
 722- Description: Whether to show git diff indicators in the scrollbar.
 723- Setting: `git_diff`
 724- Default: `true`
 725
 726**Options**
 727
 728`boolean` values
 729
 730### Search Results Indicators
 731
 732- Description: Whether to show buffer search results in the scrollbar.
 733- Setting: `search_results`
 734- Default: `true`
 735
 736**Options**
 737
 738`boolean` values
 739
 740### Selected Text Indicators
 741
 742- Description: Whether to show selected text occurrences in the scrollbar.
 743- Setting: `selected_text`
 744- Default: `true`
 745
 746**Options**
 747
 748`boolean` values
 749
 750### Selected Symbols Indicators
 751
 752- Description: Whether to show selected symbol occurrences in the scrollbar.
 753- Setting: `selected_symbol`
 754- Default: `true`
 755
 756**Options**
 757
 758`boolean` values
 759
 760### Diagnostics
 761
 762- Description: Which diagnostic indicators to show in the scrollbar.
 763- Setting: `diagnostics`
 764- Default: `all`
 765
 766**Options**
 767
 7681. Show all diagnostics:
 769
 770```json
 771{
 772  "diagnostics": "all"
 773}
 774```
 775
 7762. Do not show any diagnostics:
 777
 778```json
 779{
 780  "diagnostics": "none"
 781}
 782```
 783
 7843. Show only errors:
 785
 786```json
 787{
 788  "diagnostics": "error"
 789}
 790```
 791
 7924. Show only errors and warnings:
 793
 794```json
 795{
 796  "diagnostics": "warning"
 797}
 798```
 799
 8005. Show only errors, warnings, and information:
 801
 802```json
 803{
 804  "diagnostics": "information"
 805}
 806```
 807
 808### Axes
 809
 810- Description: Forcefully enable or disable the scrollbar for each axis
 811- Setting: `axes`
 812- Default:
 813
 814```json
 815"scrollbar": {
 816  "axes": {
 817    "horizontal": true,
 818    "vertical": true,
 819  },
 820}
 821```
 822
 823#### Horizontal
 824
 825- Description: When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
 826- Setting: `horizontal`
 827- Default: `true`
 828
 829**Options**
 830
 831`boolean` values
 832
 833#### Vertical
 834
 835- Description: When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
 836- Setting: `vertical`
 837- Default: `true`
 838
 839**Options**
 840
 841`boolean` values
 842
 843## Minimap
 844
 845- Description: Settings related to the editor's minimap, which provides an overview of your document.
 846- Setting: `minimap`
 847- Default:
 848
 849```json
 850{
 851  "minimap": {
 852    "show": "never",
 853    "thumb": "always",
 854    "thumb_border": "left_open",
 855    "current_line_highlight": null
 856  }
 857}
 858```
 859
 860### Show Mode
 861
 862- Description: When to show the minimap in the editor.
 863- Setting: `show`
 864- Default: `never`
 865
 866**Options**
 867
 8681. Always show the minimap:
 869
 870```json
 871{
 872  "show": "always"
 873}
 874```
 875
 8762. Show the minimap if the editor's scrollbars are visible:
 877
 878```json
 879{
 880  "show": "auto"
 881}
 882```
 883
 8843. Never show the minimap:
 885
 886```json
 887{
 888  "show": "never"
 889}
 890```
 891
 892### Thumb Display
 893
 894- Description: When to show the minimap thumb (the visible editor area) in the minimap.
 895- Setting: `thumb`
 896- Default: `always`
 897
 898**Options**
 899
 9001. Show the minimap thumb when hovering over the minimap:
 901
 902```json
 903{
 904  "thumb": "hover"
 905}
 906```
 907
 9082. Always show the minimap thumb:
 909
 910```json
 911{
 912  "thumb": "always"
 913}
 914```
 915
 916### Thumb Border
 917
 918- Description: How the minimap thumb border should look.
 919- Setting: `thumb_border`
 920- Default: `left_open`
 921
 922**Options**
 923
 9241. Display a border on all sides of the thumb:
 925
 926```json
 927{
 928  "thumb_border": "full"
 929}
 930```
 931
 9322. Display a border on all sides except the left side:
 933
 934```json
 935{
 936  "thumb_border": "left_open"
 937}
 938```
 939
 9403. Display a border on all sides except the right side:
 941
 942```json
 943{
 944  "thumb_border": "right_open"
 945}
 946```
 947
 9484. Display a border only on the left side:
 949
 950```json
 951{
 952  "thumb_border": "left_only"
 953}
 954```
 955
 9565. Display the thumb without any border:
 957
 958```json
 959{
 960  "thumb_border": "none"
 961}
 962```
 963
 964### Current Line Highlight
 965
 966- Description: How to highlight the current line in the minimap.
 967- Setting: `current_line_highlight`
 968- Default: `null`
 969
 970**Options**
 971
 9721. Inherit the editor's current line highlight setting:
 973
 974```json
 975{
 976  "minimap": {
 977    "current_line_highlight": null
 978  }
 979}
 980```
 981
 9822. Highlight the current line in the minimap:
 983
 984```json
 985{
 986  "minimap": {
 987    "current_line_highlight": "line"
 988  }
 989}
 990```
 991
 992or
 993
 994```json
 995{
 996  "minimap": {
 997    "current_line_highlight": "all"
 998  }
 999}
1000```
1001
10023. Do not highlight the current line in the minimap:
1003
1004```json
1005{
1006  "minimap": {
1007    "current_line_highlight": "gutter"
1008  }
1009}
1010```
1011
1012or
1013
1014```json
1015{
1016  "minimap": {
1017    "current_line_highlight": "none"
1018  }
1019}
1020```
1021
1022## Editor Tab Bar
1023
1024- Description: Settings related to the editor's tab bar.
1025- Settings: `tab_bar`
1026- Default:
1027
1028```json
1029"tab_bar": {
1030  "show": true,
1031  "show_nav_history_buttons": true,
1032  "show_tab_bar_buttons": true
1033}
1034```
1035
1036### Show
1037
1038- Description: Whether or not to show the tab bar in the editor.
1039- Setting: `show`
1040- Default: `true`
1041
1042**Options**
1043
1044`boolean` values
1045
1046### Navigation History Buttons
1047
1048- Description: Whether or not to show the navigation history buttons.
1049- Setting: `show_nav_history_buttons`
1050- Default: `true`
1051
1052**Options**
1053
1054`boolean` values
1055
1056### Tab Bar Buttons
1057
1058- Description: Whether or not to show the tab bar buttons.
1059- Setting: `show_tab_bar_buttons`
1060- Default: `true`
1061
1062**Options**
1063
1064`boolean` values
1065
1066## Editor Tabs
1067
1068- Description: Configuration for the editor tabs.
1069- Setting: `tabs`
1070- Default:
1071
1072```json
1073"tabs": {
1074  "close_position": "right",
1075  "file_icons": false,
1076  "git_status": false,
1077  "activate_on_close": "history",
1078  "show_close_button": "hover",
1079  "show_diagnostics": "off"
1080},
1081```
1082
1083### Close Position
1084
1085- Description: Where to display close button within a tab.
1086- Setting: `close_position`
1087- Default: `right`
1088
1089**Options**
1090
10911. Display the close button on the right:
1092
1093```json
1094{
1095  "close_position": "right"
1096}
1097```
1098
10992. Display the close button on the left:
1100
1101```json
1102{
1103  "close_position": "left"
1104}
1105```
1106
1107### File Icons
1108
1109- Description: Whether to show the file icon for a tab.
1110- Setting: `file_icons`
1111- Default: `false`
1112
1113### Git Status
1114
1115- Description: Whether or not to show Git file status in tab.
1116- Setting: `git_status`
1117- Default: `false`
1118
1119### Activate on close
1120
1121- Description: What to do after closing the current tab.
1122- Setting: `activate_on_close`
1123- Default: `history`
1124
1125**Options**
1126
11271.  Activate the tab that was open previously:
1128
1129```json
1130{
1131  "activate_on_close": "history"
1132}
1133```
1134
11352. Activate the right neighbour tab if present:
1136
1137```json
1138{
1139  "activate_on_close": "neighbour"
1140}
1141```
1142
11433. Activate the left neighbour tab if present:
1144
1145```json
1146{
1147  "activate_on_close": "left_neighbour"
1148}
1149```
1150
1151### Show close button
1152
1153- Description: Controls the appearance behavior of the tab's close button.
1154- Setting: `show_close_button`
1155- Default: `hover`
1156
1157**Options**
1158
11591.  Show it just upon hovering the tab:
1160
1161```json
1162{
1163  "show_close_button": "hover"
1164}
1165```
1166
11672. Show it persistently:
1168
1169```json
1170{
1171  "show_close_button": "always"
1172}
1173```
1174
11753. Never show it, even if hovering it:
1176
1177```json
1178{
1179  "show_close_button": "hidden"
1180}
1181```
1182
1183### Show Diagnostics
1184
1185- Description: Whether to show diagnostics indicators in tabs. This setting only works when file icons are active and controls which files with diagnostic issues to mark.
1186- Setting: `show_diagnostics`
1187- Default: `off`
1188
1189**Options**
1190
11911. Do not mark any files:
1192
1193```json
1194{
1195  "show_diagnostics": "off"
1196}
1197```
1198
11992. Only mark files with errors:
1200
1201```json
1202{
1203  "show_diagnostics": "errors"
1204}
1205```
1206
12073. Mark files with errors and warnings:
1208
1209```json
1210{
1211  "show_diagnostics": "all"
1212}
1213```
1214
1215### Show Inline Code Actions
1216
1217- Description: Whether to show code action button at start of buffer line.
1218- Setting: `inline_code_actions`
1219- Default: `true`
1220
1221**Options**
1222
1223`boolean` values
1224
1225### Drag And Drop Selection
1226
1227- Description: Whether to allow drag and drop text selection in buffer. `delay` is the milliseconds that must elapse before drag and drop is allowed. Otherwise, a new text selection is created.
1228- Setting: `drag_and_drop_selection`
1229- Default:
1230
1231```json
1232"drag_and_drop_selection": {
1233  "enabled": true,
1234  "delay": 300
1235}
1236```
1237
1238## Editor Toolbar
1239
1240- Description: Whether or not to show various elements in the editor toolbar.
1241- Setting: `toolbar`
1242- Default:
1243
1244```json
1245"toolbar": {
1246  "breadcrumbs": true,
1247  "quick_actions": true,
1248  "selections_menu": true,
1249  "agent_review": true,
1250  "code_actions": false
1251},
1252```
1253
1254**Options**
1255
1256Each option controls displaying of a particular toolbar element. If all elements are hidden, the editor toolbar is not displayed.
1257
1258## Enable Language Server
1259
1260- Description: Whether or not to use language servers to provide code intelligence.
1261- Setting: `enable_language_server`
1262- Default: `true`
1263
1264**Options**
1265
1266`boolean` values
1267
1268## Ensure Final Newline On Save
1269
1270- Description: Removes any lines containing only whitespace at the end of the file and ensures just one newline at the end.
1271- Setting: `ensure_final_newline_on_save`
1272- Default: `true`
1273
1274**Options**
1275
1276`boolean` values
1277
1278## LSP
1279
1280- Description: Configuration for language servers.
1281- Setting: `lsp`
1282- Default: `null`
1283
1284**Options**
1285
1286The following settings can be overridden for specific language servers:
1287
1288- `initialization_options`
1289- `settings`
1290
1291To override configuration for a language server, add an entry for that language server's name to the `lsp` value.
1292
1293Some 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.
1294
1295For example to pass the `check` option to `rust-analyzer`, use the following configuration:
1296
1297```json
1298"lsp": {
1299  "rust-analyzer": {
1300    "initialization_options": {
1301      "check": {
1302        "command": "clippy" // rust-analyzer.check.command (default: "check")
1303      }
1304    }
1305  }
1306}
1307```
1308
1309While other options may be changed at a runtime and should be placed under `settings`:
1310
1311```json
1312"lsp": {
1313  "yaml-language-server": {
1314    "settings": {
1315      "yaml": {
1316        "keyOrdering": true // Enforces alphabetical ordering of keys in maps
1317      }
1318    }
1319  }
1320}
1321```
1322
1323## LSP Highlight Debounce
1324
1325- Description: The debounce delay in milliseconds before querying highlights from the language server based on the current cursor location.
1326- Setting: `lsp_highlight_debounce`
1327- Default: `75`
1328
1329**Options**
1330
1331`integer` values representing milliseconds
1332
1333## Format On Save
1334
1335- Description: Whether or not to perform a buffer format before saving.
1336- Setting: `format_on_save`
1337- Default: `on`
1338
1339**Options**
1340
13411. `on`, enables format on save obeying `formatter` setting:
1342
1343```json
1344{
1345  "format_on_save": "on"
1346}
1347```
1348
13492. `off`, disables format on save:
1350
1351```json
1352{
1353  "format_on_save": "off"
1354}
1355```
1356
1357## Formatter
1358
1359- Description: How to perform a buffer format.
1360- Setting: `formatter`
1361- Default: `auto`
1362
1363**Options**
1364
13651. To use the current language server, use `"language_server"`:
1366
1367```json
1368{
1369  "formatter": "language_server"
1370}
1371```
1372
13732. 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):
1374
1375```json
1376{
1377  "formatter": {
1378    "external": {
1379      "command": "sed",
1380      "arguments": ["-e", "s/ *$//"]
1381    }
1382  }
1383}
1384```
1385
13863. 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.
1387
1388WARNING: `{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.
1389
1390```json
1391  "formatter": {
1392    "external": {
1393      "command": "prettier",
1394      "arguments": ["--stdin-filepath", "{buffer_path}"]
1395    }
1396  }
1397```
1398
13994. Or to use code actions provided by the connected language servers, use `"code_actions"`:
1400
1401```json
1402{
1403  "formatter": {
1404    "code_actions": {
1405      // Use ESLint's --fix:
1406      "source.fixAll.eslint": true,
1407      // Organize imports on save:
1408      "source.organizeImports": true
1409    }
1410  }
1411}
1412```
1413
14145. Or to use multiple formatters consecutively, use an array of formatters:
1415
1416```json
1417{
1418  "formatter": [
1419    { "language_server": { "name": "rust-analyzer" } },
1420    {
1421      "external": {
1422        "command": "sed",
1423        "arguments": ["-e", "s/ *$//"]
1424      }
1425    }
1426  ]
1427}
1428```
1429
1430Here `rust-analyzer` will be used first to format the code, followed by a call of sed.
1431If any of the formatters fails, the subsequent ones will still be executed.
1432
1433## Code Actions On Format
1434
1435- Description: The code actions to perform with the primary language server when formatting the buffer.
1436- Setting: `code_actions_on_format`
1437- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`
1438
1439**Examples**
1440
1441<!--
1442TBD: Add Python Ruff source.organizeImports example
1443-->
1444
14451. Organize imports on format in TypeScript and TSX buffers:
1446
1447```json
1448{
1449  "languages": {
1450    "TypeScript": {
1451      "code_actions_on_format": {
1452        "source.organizeImports": true
1453      }
1454    },
1455    "TSX": {
1456      "code_actions_on_format": {
1457        "source.organizeImports": true
1458      }
1459    }
1460  }
1461}
1462```
1463
14642. Run ESLint `fixAll` code action when formatting:
1465
1466```json
1467{
1468  "languages": {
1469    "JavaScript": {
1470      "code_actions_on_format": {
1471        "source.fixAll.eslint": true
1472      }
1473    }
1474  }
1475}
1476```
1477
14783. Run only a single ESLint rule when using `fixAll`:
1479
1480```json
1481{
1482  "languages": {
1483    "JavaScript": {
1484      "code_actions_on_format": {
1485        "source.fixAll.eslint": true
1486      }
1487    }
1488  },
1489  "lsp": {
1490    "eslint": {
1491      "settings": {
1492        "codeActionOnSave": {
1493          "rules": ["import/order"]
1494        }
1495      }
1496    }
1497  }
1498}
1499```
1500
1501## Auto close
1502
1503- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.
1504- Setting: `use_autoclose`
1505- Default: `true`
1506
1507**Options**
1508
1509`boolean` values
1510
1511## Always Treat Brackets As Autoclosed
1512
1513- Description: Controls how the editor handles the autoclosed characters.
1514- Setting: `always_treat_brackets_as_autoclosed`
1515- Default: `false`
1516
1517**Options**
1518
1519`boolean` values
1520
1521**Example**
1522
1523If the setting is set to `true`:
1524
15251. Enter in the editor: `)))`
15262. Move the cursor to the start: `^)))`
15273. Enter again: `)))`
1528
1529The result is still `)))` and not `))))))`, which is what it would be by default.
1530
1531## File Scan Exclusions
1532
1533- Setting: `file_scan_exclusions`
1534- 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`.
1535- Default:
1536
1537```json
1538"file_scan_exclusions": [
1539  "**/.git",
1540  "**/.svn",
1541  "**/.hg",
1542  "**/.jj",
1543  "**/CVS",
1544  "**/.DS_Store",
1545  "**/Thumbs.db",
1546  "**/.classpath",
1547  "**/.settings"
1548],
1549```
1550
1551Note, 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.
1552
1553## File Scan Inclusions
1554
1555- Setting: `file_scan_inclusions`
1556- 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.
1557- Default:
1558
1559```json
1560"file_scan_inclusions": [".env*"],
1561```
1562
1563## File Types
1564
1565- Setting: `file_types`
1566- Description: Configure how Zed selects a language for a file based on its filename or extension. Supports glob entries.
1567- Default:
1568
1569```json
1570"file_types": {
1571  "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
1572  "Shell Script": [".env.*"]
1573}
1574```
1575
1576**Examples**
1577
1578To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files starting with `Dockerfile` as Dockerfile:
1579
1580```json
1581{
1582  "file_types": {
1583    "C++": ["c"],
1584    "TOML": ["MyLockFile"],
1585    "Dockerfile": ["Dockerfile*"]
1586  }
1587}
1588```
1589
1590## Diagnostics
1591
1592- Description: Configuration for diagnostics-related features.
1593- Setting: `diagnostics`
1594- Default:
1595
1596```json
1597{
1598  "diagnostics": {
1599    "include_warnings": true,
1600    "inline": {
1601      "enabled": false
1602    },
1603    "update_with_cursor": false,
1604    "primary_only": false,
1605    "use_rendered": false
1606  }
1607}
1608```
1609
1610### Inline Diagnostics
1611
1612- Description: Whether or not to show diagnostics information inline.
1613- Setting: `inline`
1614- Default:
1615
1616```json
1617{
1618  "diagnostics": {
1619    "inline": {
1620      "enabled": false,
1621      "update_debounce_ms": 150,
1622      "padding": 4,
1623      "min_column": 0,
1624      "max_severity": null
1625    }
1626  }
1627}
1628```
1629
1630**Options**
1631
16321. Enable inline diagnostics.
1633
1634```json
1635{
1636  "diagnostics": {
1637    "inline": {
1638      "enabled": true
1639    }
1640  }
1641}
1642```
1643
16442. Delay diagnostic updates until some time after the last diagnostic update.
1645
1646```json
1647{
1648  "diagnostics": {
1649    "inline": {
1650      "enabled": true,
1651      "update_debounce_ms": 150
1652    }
1653  }
1654}
1655```
1656
16573. Set padding between the end of the source line and the start of the diagnostic.
1658
1659```json
1660{
1661  "diagnostics": {
1662    "inline": {
1663      "enabled": true,
1664      "padding": 4
1665    }
1666  }
1667}
1668```
1669
16704. Horizontally align inline diagnostics at the given column.
1671
1672```json
1673{
1674  "diagnostics": {
1675    "inline": {
1676      "enabled": true,
1677      "min_column": 80
1678    }
1679  }
1680}
1681```
1682
16835. Show only warning and error diagnostics.
1684
1685```json
1686{
1687  "diagnostics": {
1688    "inline": {
1689      "enabled": true,
1690      "max_severity": "warning"
1691    }
1692  }
1693}
1694```
1695
1696## Git
1697
1698- Description: Configuration for git-related features.
1699- Setting: `git`
1700- Default:
1701
1702```json
1703{
1704  "git": {
1705    "git_gutter": "tracked_files",
1706    "inline_blame": {
1707      "enabled": true
1708    },
1709    "hunk_style": "staged_hollow"
1710  }
1711}
1712```
1713
1714### Git Gutter
1715
1716- Description: Whether or not to show the git gutter.
1717- Setting: `git_gutter`
1718- Default: `tracked_files`
1719
1720**Options**
1721
17221. Show git gutter in tracked files
1723
1724```json
1725{
1726  "git": {
1727    "git_gutter": "tracked_files"
1728  }
1729}
1730```
1731
17322. Hide git gutter
1733
1734```json
1735{
1736  "git": {
1737    "git_gutter": "hide"
1738  }
1739}
1740```
1741
1742### Gutter Debounce
1743
1744- Description: Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
1745- Setting: `gutter_debounce`
1746- Default: `null`
1747
1748**Options**
1749
1750`integer` values representing milliseconds
1751
1752Example:
1753
1754```json
1755{
1756  "git": {
1757    "gutter_debounce": 100
1758  }
1759}
1760```
1761
1762### Inline Git Blame
1763
1764- Description: Whether or not to show git blame information inline, on the currently focused line.
1765- Setting: `inline_blame`
1766- Default:
1767
1768```json
1769{
1770  "git": {
1771    "inline_blame": {
1772      "enabled": true
1773    }
1774  }
1775}
1776```
1777
1778**Options**
1779
17801. Disable inline git blame:
1781
1782```json
1783{
1784  "git": {
1785    "inline_blame": {
1786      "enabled": false
1787    }
1788  }
1789}
1790```
1791
17922. Only show inline git blame after a delay (that starts after cursor stops moving):
1793
1794```json
1795{
1796  "git": {
1797    "inline_blame": {
1798      "delay_ms": 500
1799    }
1800  }
1801}
1802```
1803
18043. Show a commit summary next to the commit date and author:
1805
1806```json
1807{
1808  "git": {
1809    "inline_blame": {
1810      "show_commit_summary": true
1811    }
1812  }
1813}
1814```
1815
18164. Use this as the minimum column at which to display inline blame information:
1817
1818```json
1819{
1820  "git": {
1821    "inline_blame": {
1822      "min_column": 80
1823    }
1824  }
1825}
1826```
1827
18285. Set the padding between the end of the line and the inline blame hint, in ems:
1829
1830```json
1831{
1832  "git": {
1833    "inline_blame": {
1834      "padding": 10
1835    }
1836  }
1837}
1838```
1839
1840### Hunk Style
1841
1842- Description: What styling we should use for the diff hunks.
1843- Setting: `hunk_style`
1844- Default:
1845
1846```json
1847{
1848  "git": {
1849    "hunk_style": "staged_hollow"
1850  }
1851}
1852```
1853
1854**Options**
1855
18561. Show the staged hunks faded out and with a border:
1857
1858```json
1859{
1860  "git": {
1861    "hunk_style": "staged_hollow"
1862  }
1863}
1864```
1865
18662. Show unstaged hunks faded out and with a border:
1867
1868```json
1869{
1870  "git": {
1871    "hunk_style": "unstaged_hollow"
1872  }
1873}
1874```
1875
1876## Indent Guides
1877
1878- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
1879- Setting: `indent_guides`
1880- Default:
1881
1882```json
1883{
1884  "indent_guides": {
1885    "enabled": true,
1886    "line_width": 1,
1887    "active_line_width": 1,
1888    "coloring": "fixed",
1889    "background_coloring": "disabled"
1890  }
1891}
1892```
1893
1894**Options**
1895
18961. Disable indent guides
1897
1898```json
1899{
1900  "indent_guides": {
1901    "enabled": false
1902  }
1903}
1904```
1905
19062. Enable indent guides for a specific language.
1907
1908```json
1909{
1910  "languages": {
1911    "Python": {
1912      "indent_guides": {
1913        "enabled": true
1914      }
1915    }
1916  }
1917}
1918```
1919
19203. Enable indent aware coloring ("rainbow indentation").
1921   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.
1922
1923```json
1924{
1925  "indent_guides": {
1926    "enabled": true,
1927    "coloring": "indent_aware"
1928  }
1929}
1930```
1931
19324. Enable indent aware background coloring ("rainbow indentation").
1933   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.
1934
1935```json
1936{
1937  "indent_guides": {
1938    "enabled": true,
1939    "coloring": "indent_aware",
1940    "background_coloring": "indent_aware"
1941  }
1942}
1943```
1944
1945## Hard Tabs
1946
1947- Description: Whether to indent lines using tab characters or multiple spaces.
1948- Setting: `hard_tabs`
1949- Default: `false`
1950
1951**Options**
1952
1953`boolean` values
1954
1955## Multi Cursor Modifier
1956
1957- Description: Determines the modifier to be used to add multiple cursors with the mouse. The open hover link mouse gestures will adapt such that it do not conflict with the multicursor modifier.
1958- Setting: `multi_cursor_modifier`
1959- Default: `alt`
1960
1961**Options**
1962
19631. Maps to `Alt` on Linux and Windows and to `Option` on MacOS:
1964
1965```json
1966{
1967  "multi_cursor_modifier": "alt"
1968}
1969```
1970
19712. Maps `Control` on Linux and Windows and to `Command` on MacOS:
1972
1973```json
1974{
1975  "multi_cursor_modifier": "cmd_or_ctrl" // alias: "cmd", "ctrl"
1976}
1977```
1978
1979## Hover Popover Enabled
1980
1981- Description: Whether or not to show the informational hover box when moving the mouse over symbols in the editor.
1982- Setting: `hover_popover_enabled`
1983- Default: `true`
1984
1985**Options**
1986
1987`boolean` values
1988
1989## Hover Popover Delay
1990
1991- Description: Time to wait in milliseconds before showing the informational hover box.
1992- Setting: `hover_popover_delay`
1993- Default: `300`
1994
1995**Options**
1996
1997`integer` values representing milliseconds
1998
1999## Icon Theme
2000
2001- 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.
2002- Setting: `icon_theme`
2003- Default: `Zed (Default)`
2004
2005### Icon Theme Object
2006
2007- Description: Specify the icon theme using an object that includes the `mode`, `dark`, and `light`.
2008- Setting: `icon_theme`
2009- Default:
2010
2011```json
2012"icon_theme": {
2013  "mode": "system",
2014  "dark": "Zed (Default)",
2015  "light": "Zed (Default)"
2016},
2017```
2018
2019### Mode
2020
2021- Description: Specify the icon theme mode.
2022- Setting: `mode`
2023- Default: `system`
2024
2025**Options**
2026
20271. Set the icon theme to dark mode
2028
2029```json
2030{
2031  "mode": "dark"
2032}
2033```
2034
20352. Set the icon theme to light mode
2036
2037```json
2038{
2039  "mode": "light"
2040}
2041```
2042
20433. Set the icon theme to system mode
2044
2045```json
2046{
2047  "mode": "system"
2048}
2049```
2050
2051### Dark
2052
2053- Description: The name of the dark icon theme.
2054- Setting: `dark`
2055- Default: `Zed (Default)`
2056
2057**Options**
2058
2059Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
2060
2061### Light
2062
2063- Description: The name of the light icon theme.
2064- Setting: `light`
2065- Default: `Zed (Default)`
2066
2067**Options**
2068
2069Run the `icon theme selector: toggle` action in the command palette to see a current list of valid icon themes names.
2070
2071## Inlay hints
2072
2073- Description: Configuration for displaying extra text with hints in the editor.
2074- Setting: `inlay_hints`
2075- Default:
2076
2077```json
2078"inlay_hints": {
2079  "enabled": false,
2080  "show_type_hints": true,
2081  "show_parameter_hints": true,
2082  "show_other_hints": true,
2083  "show_background": false,
2084  "edit_debounce_ms": 700,
2085  "scroll_debounce_ms": 50,
2086  "toggle_on_modifiers_press": null
2087}
2088```
2089
2090**Options**
2091
2092Inlay hints querying consists of two parts: editor (client) and LSP server.
2093With 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.
2094At 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.
2095
2096The following languages have inlay hints preconfigured by Zed:
2097
2098- [Go](https://docs.zed.dev/languages/go)
2099- [Rust](https://docs.zed.dev/languages/rust)
2100- [Svelte](https://docs.zed.dev/languages/svelte)
2101- [Typescript](https://docs.zed.dev/languages/typescript)
2102
2103Use the `lsp` section for the server configuration. Examples are provided in the corresponding language documentation.
2104
2105Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
2106Settings-related hint updates are not debounced.
2107
2108All possible config values for `toggle_on_modifiers_press` are:
2109
2110```json
2111"inlay_hints": {
2112  "toggle_on_modifiers_press": {
2113    "control": true,
2114    "shift": true,
2115    "alt": true,
2116    "platform": true,
2117    "function": true
2118  }
2119}
2120```
2121
2122Unspecified values have a `false` value, hints won't be toggled if all the modifiers are `false` or not all the modifiers are pressed.
2123
2124## Journal
2125
2126- Description: Configuration for the journal.
2127- Setting: `journal`
2128- Default:
2129
2130```json
2131"journal": {
2132  "path": "~",
2133  "hour_format": "hour12"
2134}
2135```
2136
2137### Path
2138
2139- Description: The path of the directory where journal entries are stored.
2140- Setting: `path`
2141- Default: `~`
2142
2143**Options**
2144
2145`string` values
2146
2147### Hour Format
2148
2149- Description: The format to use for displaying hours in the journal.
2150- Setting: `hour_format`
2151- Default: `hour12`
2152
2153**Options**
2154
21551. 12-hour format:
2156
2157```json
2158{
2159  "hour_format": "hour12"
2160}
2161```
2162
21632. 24-hour format:
2164
2165```json
2166{
2167  "hour_format": "hour24"
2168}
2169```
2170
2171## Languages
2172
2173- Description: Configuration for specific languages.
2174- Setting: `languages`
2175- Default: `null`
2176
2177**Options**
2178
2179To override settings for a language, add an entry for that languages name to the `languages` value. Example:
2180
2181```json
2182"languages": {
2183  "C": {
2184    "format_on_save": "off",
2185    "preferred_line_length": 64,
2186    "soft_wrap": "preferred_line_length"
2187  },
2188  "JSON": {
2189    "tab_size": 4
2190  }
2191}
2192```
2193
2194The following settings can be overridden for each specific language:
2195
2196- [`enable_language_server`](#enable-language-server)
2197- [`ensure_final_newline_on_save`](#ensure-final-newline-on-save)
2198- [`format_on_save`](#format-on-save)
2199- [`formatter`](#formatter)
2200- [`hard_tabs`](#hard-tabs)
2201- [`preferred_line_length`](#preferred-line-length)
2202- [`remove_trailing_whitespace_on_save`](#remove-trailing-whitespace-on-save)
2203- [`show_edit_predictions`](#show-edit-predictions)
2204- [`show_whitespaces`](#show-whitespaces)
2205- [`soft_wrap`](#soft-wrap)
2206- [`tab_size`](#tab-size)
2207- [`use_autoclose`](#use-autoclose)
2208- [`always_treat_brackets_as_autoclosed`](#always-treat-brackets-as-autoclosed)
2209
2210These values take in the same options as the root-level settings with the same name.
2211
2212## Network Proxy
2213
2214- Description: Configure a network proxy for Zed.
2215- Setting: `proxy`
2216- Default: `null`
2217
2218**Options**
2219
2220The proxy setting must contain a URL to the proxy.
2221
2222The following URI schemes are supported:
2223
2224- `http`
2225- `https`
2226- `socks4` - SOCKS4 proxy with local DNS
2227- `socks4a` - SOCKS4 proxy with remote DNS
2228- `socks5` - SOCKS5 proxy with local DNS
2229- `socks5h` - SOCKS5 proxy with remote DNS
2230
2231`http` will be used when no scheme is specified.
2232
2233By 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`, `no_proxy` and `NO_PROXY`.
2234
2235For example, to set an `http` proxy, add the following to your settings:
2236
2237```json
2238{
2239  "proxy": "http://127.0.0.1:10809"
2240}
2241```
2242
2243Or to set a `socks5` proxy:
2244
2245```json
2246{
2247  "proxy": "socks5h://localhost:10808"
2248}
2249```
2250
2251If you wish to exclude certain hosts from using the proxy, set the `NO_PROXY` environment variable. This accepts a comma-separated list of hostnames, host suffixes, IPv4/IPv6 addresses or blocks that should not use the proxy. For example if your environment included `NO_PROXY="google.com, 192.168.1.0/24"` all hosts in `192.168.1.*`, `google.com` and `*.google.com` would bypass the proxy. See [reqwest NoProxy docs](https://docs.rs/reqwest/latest/reqwest/struct.NoProxy.html#method.from_string) for more.
2252
2253## Preview tabs
2254
2255- Description:
2256  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. \
2257   There are several ways to convert a preview tab into a regular tab:
2258
2259  - Double-clicking on the file
2260  - Double-clicking on the tab header
2261  - Using the `project_panel::OpenPermanent` action
2262  - Editing the file
2263  - Dragging the file to a different pane
2264
2265- Setting: `preview_tabs`
2266- Default:
2267
2268```json
2269"preview_tabs": {
2270  "enabled": true,
2271  "enable_preview_from_file_finder": false,
2272  "enable_preview_from_code_navigation": false,
2273}
2274```
2275
2276### Enable preview from file finder
2277
2278- Description: Determines whether to open files in preview mode when selected from the file finder.
2279- Setting: `enable_preview_from_file_finder`
2280- Default: `false`
2281
2282**Options**
2283
2284`boolean` values
2285
2286### Enable preview from code navigation
2287
2288- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
2289- Setting: `enable_preview_from_code_navigation`
2290- Default: `false`
2291
2292**Options**
2293
2294`boolean` values
2295
2296## File Finder
2297
2298### File Icons
2299
2300- Description: Whether to show file icons in the file finder.
2301- Setting: `file_icons`
2302- Default: `true`
2303
2304### Modal Max Width
2305
2306- Description: Max-width of the file finder modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
2307- Setting: `modal_max_width`
2308- Default: `small`
2309
2310### Skip Focus For Active In Search
2311
2312- Description: Determines whether the file finder should skip focus for the active file in search results.
2313- Setting: `skip_focus_for_active_in_search`
2314- Default: `true`
2315
2316## Preferred Line Length
2317
2318- Description: The column at which to soft-wrap lines, for buffers where soft-wrap is enabled.
2319- Setting: `preferred_line_length`
2320- Default: `80`
2321
2322**Options**
2323
2324`integer` values
2325
2326## Projects Online By Default
2327
2328- Description: Whether or not to show the online projects view by default.
2329- Setting: `projects_online_by_default`
2330- Default: `true`
2331
2332**Options**
2333
2334`boolean` values
2335
2336## Remove Trailing Whitespace On Save
2337
2338- Description: Whether or not to remove any trailing whitespace from lines of a buffer before saving it.
2339- Setting: `remove_trailing_whitespace_on_save`
2340- Default: `true`
2341
2342**Options**
2343
2344`boolean` values
2345
2346## Search
2347
2348- Description: Search options to enable by default when opening new project and buffer searches.
2349- Setting: `search`
2350- Default:
2351
2352```json
2353"search": {
2354  "whole_word": false,
2355  "case_sensitive": false,
2356  "include_ignored": false,
2357  "regex": false
2358},
2359```
2360
2361## Seed Search Query From Cursor
2362
2363- Description: When to populate a new search's query based on the text under the cursor.
2364- Setting: `seed_search_query_from_cursor`
2365- Default: `always`
2366
2367**Options**
2368
23691. `always` always populate the search query with the word under the cursor
23702. `selection` only populate the search query when there is text selected
23713. `never` never populate the search query
2372
2373## Use Smartcase Search
2374
2375- 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. \
2376  This applies to both in-file searches and project-wide searches.
2377- Setting: `use_smartcase_search`
2378- Default: `false`
2379
2380**Options**
2381
2382`boolean` values
2383
2384Examples:
2385
2386- Searching for "function" would match "function", "Function", "FUNCTION", etc.
2387- Searching for "Function" would only match "Function", not "function" or "FUNCTION"
2388
2389## Show Call Status Icon
2390
2391- Description: Whether or not to show the call status icon in the status bar.
2392- Setting: `show_call_status_icon`
2393- Default: `true`
2394
2395**Options**
2396
2397`boolean` values
2398
2399## Completions
2400
2401- Description: Controls how completions are processed for this language.
2402- Setting: `completions`
2403- Default:
2404
2405```json
2406{
2407  "completions": {
2408    "words": "fallback",
2409    "lsp": true,
2410    "lsp_fetch_timeout_ms": 0,
2411    "lsp_insert_mode": "replace_suffix"
2412  }
2413}
2414```
2415
2416### Words
2417
2418- Description: Controls how words are completed. For large documents, not all words may be fetched for completion.
2419- Setting: `words`
2420- Default: `fallback`
2421
2422**Options**
2423
24241. `enabled` - Always fetch document's words for completions along with LSP completions
24252. `fallback` - Only if LSP response errors or times out, use document's words to show completions
24263. `disabled` - Never fetch or complete document's words for completions (word-based completions can still be queried via a separate action)
2427
2428### LSP
2429
2430- Description: Whether to fetch LSP completions or not.
2431- Setting: `lsp`
2432- Default: `true`
2433
2434**Options**
2435
2436`boolean` values
2437
2438### LSP Fetch Timeout (ms)
2439
2440- Description: When fetching LSP completions, determines how long to wait for a response of a particular server. When set to 0, waits indefinitely.
2441- Setting: `lsp_fetch_timeout_ms`
2442- Default: `0`
2443
2444**Options**
2445
2446`integer` values representing milliseconds
2447
2448### LSP Insert Mode
2449
2450- Description: Controls what range to replace when accepting LSP completions.
2451- Setting: `lsp_insert_mode`
2452- Default: `replace_suffix`
2453
2454**Options**
2455
24561. `insert` - Replaces text before the cursor, using the `insert` range described in the LSP specification
24572. `replace` - Replaces text before and after the cursor, using the `replace` range described in the LSP specification
24583. `replace_subsequence` - Behaves like `"replace"` if the text that would be replaced is a subsequence of the completion text, and like `"insert"` otherwise
24594. `replace_suffix` - Behaves like `"replace"` if the text after the cursor is a suffix of the completion, and like `"insert"` otherwise
2460
2461## Show Completions On Input
2462
2463- Description: Whether or not to show completions as you type.
2464- Setting: `show_completions_on_input`
2465- Default: `true`
2466
2467**Options**
2468
2469`boolean` values
2470
2471## Show Completion Documentation
2472
2473- Description: Whether to display inline and alongside documentation for items in the completions menu.
2474- Setting: `show_completion_documentation`
2475- Default: `true`
2476
2477**Options**
2478
2479`boolean` values
2480
2481## Show Edit Predictions
2482
2483- Description: Whether to show edit predictions as you type or manually by triggering `editor::ShowEditPrediction`.
2484- Setting: `show_edit_predictions`
2485- Default: `true`
2486
2487**Options**
2488
2489`boolean` values
2490
2491## Show Whitespaces
2492
2493- Description: Whether or not to render whitespace characters in the editor.
2494- Setting: `show_whitespaces`
2495- Default: `selection`
2496
2497**Options**
2498
24991. `all`
25002. `selection`
25013. `none`
25024. `boundary`
2503
2504## Soft Wrap
2505
2506- Description: Whether or not to automatically wrap lines of text to fit editor / preferred width.
2507- Setting: `soft_wrap`
2508- Default: `none`
2509
2510**Options**
2511
25121. `none` to avoid wrapping generally, unless the line is too long
25132. `prefer_line` (deprecated, same as `none`)
25143. `editor_width` to wrap lines that overflow the editor width
25154. `preferred_line_length` to wrap lines that overflow `preferred_line_length` config value
25165. `bounded` to wrap lines at the minimum of `editor_width` and `preferred_line_length`
2517
2518## Wrap Guides (Vertical Rulers)
2519
2520- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`.
2521- Setting: `wrap_guides`
2522- Default: []
2523
2524**Options**
2525
2526List of `integer` column numbers
2527
2528## Tab Size
2529
2530- Description: The number of spaces to use for each tab character.
2531- Setting: `tab_size`
2532- Default: `4`
2533
2534**Options**
2535
2536`integer` values
2537
2538## Telemetry
2539
2540- Description: Control what info is collected by Zed.
2541- Setting: `telemetry`
2542- Default:
2543
2544```json
2545"telemetry": {
2546  "diagnostics": true,
2547  "metrics": true
2548},
2549```
2550
2551**Options**
2552
2553### Diagnostics
2554
2555- Description: Setting for sending debug-related data, such as crash reports.
2556- Setting: `diagnostics`
2557- Default: `true`
2558
2559**Options**
2560
2561`boolean` values
2562
2563### Metrics
2564
2565- Description: Setting for sending anonymized usage data, such what languages you're using Zed with.
2566- Setting: `metrics`
2567- Default: `true`
2568
2569**Options**
2570
2571`boolean` values
2572
2573## Terminal
2574
2575- Description: Configuration for the terminal.
2576- Setting: `terminal`
2577- Default:
2578
2579```json
2580{
2581  "terminal": {
2582    "alternate_scroll": "off",
2583    "blinking": "terminal_controlled",
2584    "copy_on_select": false,
2585    "keep_selection_on_copy": false,
2586    "dock": "bottom",
2587    "default_width": 640,
2588    "default_height": 320,
2589    "detect_venv": {
2590      "on": {
2591        "directories": [".env", "env", ".venv", "venv"],
2592        "activate_script": "default"
2593      }
2594    },
2595    "env": {},
2596    "font_family": null,
2597    "font_features": null,
2598    "font_size": null,
2599    "line_height": "comfortable",
2600    "minimum_contrast": 45,
2601    "option_as_meta": false,
2602    "button": true,
2603    "shell": "system",
2604    "toolbar": {
2605      "breadcrumbs": true
2606    },
2607    "working_directory": "current_project_directory",
2608    "scrollbar": {
2609      "show": null
2610    }
2611  }
2612}
2613```
2614
2615### Terminal: Dock
2616
2617- Description: Control the position of the dock
2618- Setting: `dock`
2619- Default: `bottom`
2620
2621**Options**
2622
2623`"bottom"`, `"left"` or `"right"`
2624
2625### Terminal: Alternate Scroll
2626
2627- 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.
2628- Setting: `alternate_scroll`
2629- Default: `off`
2630
2631**Options**
2632
26331. Default alternate scroll mode to off
2634
2635```json
2636{
2637  "terminal": {
2638    "alternate_scroll": "off"
2639  }
2640}
2641```
2642
26432. Default alternate scroll mode to on
2644
2645```json
2646{
2647  "terminal": {
2648    "alternate_scroll": "on"
2649  }
2650}
2651```
2652
2653### Terminal: Blinking
2654
2655- Description: Set the cursor blinking behavior in the terminal
2656- Setting: `blinking`
2657- Default: `terminal_controlled`
2658
2659**Options**
2660
26611. Never blink the cursor, ignore the terminal mode
2662
2663```json
2664{
2665  "terminal": {
2666    "blinking": "off"
2667  }
2668}
2669```
2670
26712. Default the cursor blink to off, but allow the terminal to turn blinking on
2672
2673```json
2674{
2675  "terminal": {
2676    "blinking": "terminal_controlled"
2677  }
2678}
2679```
2680
26813. Always blink the cursor, ignore the terminal mode
2682
2683```json
2684{
2685  "terminal": {
2686    "blinking": "on"
2687  }
2688}
2689```
2690
2691### Terminal: Copy On Select
2692
2693- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
2694- Setting: `copy_on_select`
2695- Default: `false`
2696
2697**Options**
2698
2699`boolean` values
2700
2701**Example**
2702
2703```json
2704{
2705  "terminal": {
2706    "copy_on_select": true
2707  }
2708}
2709```
2710
2711### Terminal: Cursor Shape
2712
2713- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
2714- Setting: `cursor_shape`
2715- Default: `null` (defaults to block)
2716
2717**Options**
2718
27191. A block that surrounds the following character
2720
2721```json
2722{
2723  "terminal": {
2724    "cursor_shape": "block"
2725  }
2726}
2727```
2728
27292. A vertical bar
2730
2731```json
2732{
2733  "terminal": {
2734    "cursor_shape": "bar"
2735  }
2736}
2737```
2738
27393. An underline / underscore that runs along the following character
2740
2741```json
2742{
2743  "terminal": {
2744    "cursor_shape": "underline"
2745  }
2746}
2747```
2748
27494. A box drawn around the following character
2750
2751```json
2752{
2753  "terminal": {
2754    "cursor_shape": "hollow"
2755  }
2756}
2757```
2758
2759### Terminal: Keep Selection On Copy
2760
2761- Description: Whether or not to keep the selection in the terminal after copying text.
2762- Setting: `keep_selection_on_copy`
2763- Default: `false`
2764
2765**Options**
2766
2767`boolean` values
2768
2769**Example**
2770
2771```json
2772{
2773  "terminal": {
2774    "keep_selection_on_copy": true
2775  }
2776}
2777```
2778
2779### Terminal: Env
2780
2781- 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
2782- Setting: `env`
2783- Default: `{}`
2784
2785**Example**
2786
2787```json
2788{
2789  "terminal": {
2790    "env": {
2791      "ZED": "1",
2792      "KEY": "value1:value2"
2793    }
2794  }
2795}
2796```
2797
2798### Terminal: Font Size
2799
2800- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
2801- Setting: `font_size`
2802- Default: `null`
2803
2804**Options**
2805
2806`integer` values
2807
2808```json
2809{
2810  "terminal": {
2811    "font_size": 15
2812  }
2813}
2814```
2815
2816### Terminal: Font Family
2817
2818- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
2819- Setting: `font_family`
2820- Default: `null`
2821
2822**Options**
2823
2824The name of any font family installed on the user's system
2825
2826```json
2827{
2828  "terminal": {
2829    "font_family": "Berkeley Mono"
2830  }
2831}
2832```
2833
2834### Terminal: Font Features
2835
2836- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
2837- Setting: `font_features`
2838- Default: `null`
2839- Platform: macOS and Windows.
2840
2841**Options**
2842
2843See Buffer Font Features
2844
2845```json
2846{
2847  "terminal": {
2848    "font_features": {
2849      "calt": false
2850      // See Buffer Font Features for more features
2851    }
2852  }
2853}
2854```
2855
2856### Terminal: Line Height
2857
2858- Description: Set the terminal's line height.
2859- Setting: `line_height`
2860- Default: `comfortable`
2861
2862**Options**
2863
28641. Use a line height that's `comfortable` for reading, 1.618. (default)
2865
2866```json
2867{
2868  "terminal": {
2869    "line_height": "comfortable"
2870  }
2871}
2872```
2873
28742. Use a `standard` line height, 1.3. This option is useful for TUIs, particularly if they use box characters
2875
2876```json
2877{
2878  "terminal": {
2879    "line_height": "standard"
2880  }
2881}
2882```
2883
28843.  Use a custom line height.
2885
2886```json
2887{
2888  "terminal": {
2889    "line_height": {
2890      "custom": 2
2891    }
2892  }
2893}
2894```
2895
2896### Terminal: Minimum Contrast
2897
2898- Description: Controls the minimum contrast between foreground and background colors in the terminal. Uses the APCA (Accessible Perceptual Contrast Algorithm) for color adjustments. Set this to 0 to disable this feature.
2899- Setting: `minimum_contrast`
2900- Default: `45`
2901
2902**Options**
2903
2904`integer` values from 0 to 106. Common recommended values:
2905
2906- `0`: No contrast adjustment
2907- `45`: Minimum for large fluent text (default)
2908- `60`: Minimum for other content text
2909- `75`: Minimum for body text
2910- `90`: Preferred for body text
2911
2912```json
2913{
2914  "terminal": {
2915    "minimum_contrast": 45
2916  }
2917}
2918```
2919
2920### Terminal: Option As Meta
2921
2922- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
2923- Setting: `option_as_meta`
2924- Default: `false`
2925
2926**Options**
2927
2928`boolean` values
2929
2930```json
2931{
2932  "terminal": {
2933    "option_as_meta": true
2934  }
2935}
2936```
2937
2938### Terminal: Shell
2939
2940- Description: What shell to use when launching the terminal.
2941- Setting: `shell`
2942- Default: `system`
2943
2944**Options**
2945
29461. Use the system's default terminal configuration (usually the `/etc/passwd` file).
2947
2948```json
2949{
2950  "terminal": {
2951    "shell": "system"
2952  }
2953}
2954```
2955
29562. A program to launch:
2957
2958```json
2959{
2960  "terminal": {
2961    "shell": {
2962      "program": "sh"
2963    }
2964  }
2965}
2966```
2967
29683. A program with arguments:
2969
2970```json
2971{
2972  "terminal": {
2973    "shell": {
2974      "with_arguments": {
2975        "program": "/bin/bash",
2976        "args": ["--login"]
2977      }
2978    }
2979  }
2980}
2981```
2982
2983## Terminal: Detect Virtual Environments {#terminal-detect_venv}
2984
2985- 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.
2986- Setting: `detect_venv`
2987- Default:
2988
2989```json
2990{
2991  "terminal": {
2992    "detect_venv": {
2993      "on": {
2994        // Default directories to search for virtual environments, relative
2995        // to the current working directory. We recommend overriding this
2996        // in your project's settings, rather than globally.
2997        "directories": [".env", "env", ".venv", "venv"],
2998        // Can also be `csh`, `fish`, and `nushell`
2999        "activate_script": "default"
3000      }
3001    }
3002  }
3003}
3004```
3005
3006Disable with:
3007
3008```json
3009{
3010  "terminal": {
3011    "detect_venv": "off"
3012  }
3013}
3014```
3015
3016## Terminal: Toolbar
3017
3018- Description: Whether or not to show various elements in the terminal toolbar.
3019- Setting: `toolbar`
3020- Default:
3021
3022```json
3023{
3024  "terminal": {
3025    "toolbar": {
3026      "breadcrumbs": true
3027    }
3028  }
3029}
3030```
3031
3032**Options**
3033
3034At the moment, only the `breadcrumbs` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`.
3035
3036If the terminal title is empty, the breadcrumbs won't be shown.
3037
3038The shell running in the terminal needs to be configured to emit the title.
3039
3040Example command to set the title: `echo -e "\e]2;New Title\007";`
3041
3042### Terminal: Button
3043
3044- Description: Control to show or hide the terminal button in the status bar
3045- Setting: `button`
3046- Default: `true`
3047
3048**Options**
3049
3050`boolean` values
3051
3052```json
3053{
3054  "terminal": {
3055    "button": false
3056  }
3057}
3058```
3059
3060### Terminal: Working Directory
3061
3062- Description: What working directory to use when launching the terminal.
3063- Setting: `working_directory`
3064- Default: `"current_project_directory"`
3065
3066**Options**
3067
30681. Use the current file's project directory. Will Fallback to the first project directory strategy if unsuccessful
3069
3070```json
3071{
3072  "terminal": {
3073    "working_directory": "current_project_directory"
3074  }
3075}
3076```
3077
30782. Use the first project in this workspace's directory. Will fallback to using this platform's home directory.
3079
3080```json
3081{
3082  "terminal": {
3083    "working_directory": "first_project_directory"
3084  }
3085}
3086```
3087
30883. Always use this platform's home directory (if we can find it)
3089
3090```json
3091{
3092  "terminal": {
3093    "working_directory": "always_home"
3094  }
3095}
3096```
3097
30984. 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.
3099
3100```json
3101{
3102  "terminal": {
3103    "working_directory": {
3104      "always": {
3105        "directory": "~/zed/projects/"
3106      }
3107    }
3108  }
3109}
3110```
3111
3112## Theme
3113
3114- 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.
3115- Setting: `theme`
3116- Default: `One Dark`
3117
3118### Theme Object
3119
3120- Description: Specify the theme using an object that includes the `mode`, `dark`, and `light` themes.
3121- Setting: `theme`
3122- Default:
3123
3124```json
3125"theme": {
3126  "mode": "system",
3127  "dark": "One Dark",
3128  "light": "One Light"
3129},
3130```
3131
3132### Mode
3133
3134- Description: Specify theme mode.
3135- Setting: `mode`
3136- Default: `system`
3137
3138**Options**
3139
31401. Set the theme to dark mode
3141
3142```json
3143{
3144  "mode": "dark"
3145}
3146```
3147
31482. Set the theme to light mode
3149
3150```json
3151{
3152  "mode": "light"
3153}
3154```
3155
31563. Set the theme to system mode
3157
3158```json
3159{
3160  "mode": "system"
3161}
3162```
3163
3164### Dark
3165
3166- Description: The name of the dark Zed theme to use for the UI.
3167- Setting: `dark`
3168- Default: `One Dark`
3169
3170**Options**
3171
3172Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
3173
3174### Light
3175
3176- Description: The name of the light Zed theme to use for the UI.
3177- Setting: `light`
3178- Default: `One Light`
3179
3180**Options**
3181
3182Run the `theme selector: toggle` action in the command palette to see a current list of valid themes names.
3183
3184## Vim
3185
3186- Description: Whether or not to enable vim mode (work in progress).
3187- Setting: `vim_mode`
3188- Default: `false`
3189
3190## Project Panel
3191
3192- Description: Customize project panel
3193- Setting: `project_panel`
3194- Default:
3195
3196```json
3197{
3198  "project_panel": {
3199    "button": true,
3200    "default_width": 240,
3201    "dock": "left",
3202    "entry_spacing": "comfortable",
3203    "file_icons": true,
3204    "folder_icons": true,
3205    "git_status": true,
3206    "indent_size": 20,
3207    "auto_reveal_entries": true,
3208    "auto_fold_dirs": true,
3209    "scrollbar": {
3210      "show": null
3211    },
3212    "show_diagnostics": "all",
3213    "indent_guides": {
3214      "show": "always"
3215    },
3216    "hide_root": false,
3217    "starts_open": true
3218  }
3219}
3220```
3221
3222### Dock
3223
3224- Description: Control the position of the dock
3225- Setting: `dock`
3226- Default: `left`
3227
3228**Options**
3229
32301. Default dock position to left
3231
3232```json
3233{
3234  "dock": "left"
3235}
3236```
3237
32382. Default dock position to right
3239
3240```json
3241{
3242  "dock": "right"
3243}
3244```
3245
3246### Entry Spacing
3247
3248- Description: Spacing between worktree entries
3249- Setting: `entry_spacing`
3250- Default: `comfortable`
3251
3252**Options**
3253
32541. Comfortable entry spacing
3255
3256```json
3257{
3258  "entry_spacing": "comfortable"
3259}
3260```
3261
32622. Standard entry spacing
3263
3264```json
3265{
3266  "entry_spacing": "standard"
3267}
3268```
3269
3270### Git Status
3271
3272- Description: Indicates newly created and updated files
3273- Setting: `git_status`
3274- Default: `true`
3275
3276**Options**
3277
32781. Default enable git status
3279
3280```json
3281{
3282  "git_status": true
3283}
3284```
3285
32862. Default disable git status
3287
3288```json
3289{
3290  "git_status": false
3291}
3292```
3293
3294### Default Width
3295
3296- Description: Customize default width taken by project panel
3297- Setting: `default_width`
3298- Default: `240`
3299
3300**Options**
3301
3302`float` values
3303
3304### Auto Reveal Entries
3305
3306- Description: Whether to reveal it in the project panel automatically, when a corresponding project entry becomes active. Gitignored entries are never auto revealed.
3307- Setting: `auto_reveal_entries`
3308- Default: `true`
3309
3310**Options**
3311
33121. Enable auto reveal entries
3313
3314```json
3315{
3316  "auto_reveal_entries": true
3317}
3318```
3319
33202. Disable auto reveal entries
3321
3322```json
3323{
3324  "auto_reveal_entries": false
3325}
3326```
3327
3328### Auto Fold Dirs
3329
3330- Description: Whether to fold directories automatically when directory has only one directory inside.
3331- Setting: `auto_fold_dirs`
3332- Default: `true`
3333
3334**Options**
3335
33361. Enable auto fold dirs
3337
3338```json
3339{
3340  "auto_fold_dirs": true
3341}
3342```
3343
33442. Disable auto fold dirs
3345
3346```json
3347{
3348  "auto_fold_dirs": false
3349}
3350```
3351
3352### Indent Size
3353
3354- Description: Amount of indentation (in pixels) for nested items.
3355- Setting: `indent_size`
3356- Default: `20`
3357
3358### Indent Guides: Show
3359
3360- Description: Whether to show indent guides in the project panel.
3361- Setting: `indent_guides`
3362- Default:
3363
3364```json
3365"indent_guides": {
3366  "show": "always"
3367}
3368```
3369
3370**Options**
3371
33721. Show indent guides in the project panel
3373
3374```json
3375{
3376  "indent_guides": {
3377    "show": "always"
3378  }
3379}
3380```
3381
33822. Hide indent guides in the project panel
3383
3384```json
3385{
3386  "indent_guides": {
3387    "show": "never"
3388  }
3389}
3390```
3391
3392### Scrollbar: Show
3393
3394- 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.
3395- Setting: `scrollbar`
3396- Default:
3397
3398```json
3399"scrollbar": {
3400  "show": null
3401}
3402```
3403
3404**Options**
3405
34061. Show scrollbar in the project panel
3407
3408```json
3409{
3410  "scrollbar": {
3411    "show": "always"
3412  }
3413}
3414```
3415
34162. Hide scrollbar in the project panel
3417
3418```json
3419{
3420  "scrollbar": {
3421    "show": "never"
3422  }
3423}
3424```
3425
3426## Agent
3427
3428Visit [the Configuration page](./ai/configuration.md) under the AI section to learn more about all the agent-related settings.
3429
3430## Outline Panel
3431
3432- Description: Customize outline Panel
3433- Setting: `outline_panel`
3434- Default:
3435
3436```json
3437"outline_panel": {
3438  "button": true,
3439  "default_width": 300,
3440  "dock": "left",
3441  "file_icons": true,
3442  "folder_icons": true,
3443  "git_status": true,
3444  "indent_size": 20,
3445  "auto_reveal_entries": true,
3446  "auto_fold_dirs": true,
3447  "indent_guides": {
3448    "show": "always"
3449  },
3450  "scrollbar": {
3451    "show": null
3452  }
3453}
3454```
3455
3456## Calls
3457
3458- Description: Customize behavior when participating in a call
3459- Setting: `calls`
3460- Default:
3461
3462```json
3463"calls": {
3464  // Join calls with the microphone live by default
3465  "mute_on_join": false,
3466  // Share your project when you are the first to join a channel
3467  "share_on_join": false
3468},
3469```
3470
3471## Unnecessary Code Fade
3472
3473- Description: How much to fade out unused code.
3474- Setting: `unnecessary_code_fade`
3475- Default: `0.3`
3476
3477**Options**
3478
3479Float values between `0.0` and `0.9`, where:
3480
3481- `0.0` means no fading (unused code looks the same as used code)
3482- `0.9` means maximum fading (unused code is very faint but still visible)
3483
3484**Example**
3485
3486```json
3487{
3488  "unnecessary_code_fade": 0.5
3489}
3490```
3491
3492## UI Font Family
3493
3494- Description: The name of the font to use for text in the UI.
3495- Setting: `ui_font_family`
3496- Default: `Zed Plex Sans`
3497
3498**Options**
3499
3500The name of any font family installed on the system.
3501
3502## UI Font Features
3503
3504- Description: The OpenType features to enable for text in the UI.
3505- Setting: `ui_font_features`
3506- Default:
3507
3508```json
3509"ui_font_features": {
3510  "calt": false
3511}
3512```
3513
3514- Platform: macOS and Windows.
3515
3516**Options**
3517
3518Zed supports all OpenType features that can be enabled or disabled for a given UI font, as well as setting values for font features.
3519
3520For example, to disable font ligatures, add the following to your settings:
3521
3522```json
3523{
3524  "ui_font_features": {
3525    "calt": false
3526  }
3527}
3528```
3529
3530You can also set other OpenType features, like setting `cv01` to `7`:
3531
3532```json
3533{
3534  "ui_font_features": {
3535    "cv01": 7
3536  }
3537}
3538```
3539
3540## UI Font Fallbacks
3541
3542- Description: The font fallbacks to use for text in the UI.
3543- Setting: `ui_font_fallbacks`
3544- Default: `null`
3545- Platform: macOS and Windows.
3546
3547**Options**
3548
3549For example, to use `Nerd Font` as a fallback, add the following to your settings:
3550
3551```json
3552{
3553  "ui_font_fallbacks": ["Nerd Font"]
3554}
3555```
3556
3557## UI Font Size
3558
3559- Description: The default font size for text in the UI.
3560- Setting: `ui_font_size`
3561- Default: `16`
3562
3563**Options**
3564
3565`integer` values from `6` to `100` pixels (inclusive)
3566
3567## UI Font Weight
3568
3569- Description: The default font weight for text in the UI.
3570- Setting: `ui_font_weight`
3571- Default: `400`
3572
3573**Options**
3574
3575`integer` values between `100` and `900`
3576
3577## An example configuration:
3578
3579```json
3580// ~/.config/zed/settings.json
3581{
3582  "theme": "cave-light",
3583  "tab_size": 2,
3584  "preferred_line_length": 80,
3585  "soft_wrap": "none",
3586
3587  "buffer_font_size": 18,
3588  "buffer_font_family": "Zed Plex Mono",
3589
3590  "autosave": "on_focus_change",
3591  "format_on_save": "off",
3592  "vim_mode": false,
3593  "projects_online_by_default": true,
3594  "terminal": {
3595    "font_family": "FiraCode Nerd Font Mono",
3596    "blinking": "off"
3597  },
3598  "languages": {
3599    "C": {
3600      "format_on_save": "language_server",
3601      "preferred_line_length": 64,
3602      "soft_wrap": "preferred_line_length"
3603    }
3604  }
3605}
3606```