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