Files
zed/docs/src/diagnostics.md
Mohamad Khani b72a46db68
Some checks failed
Update All Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Triage Project Sync (#84) / Sync triage project (push) Has been cancelled
release_nightly / notify_on_failure (push) Has been cancelled
release_nightly / check_style (push) Has been cancelled
release_nightly / run_tests_windows (push) Has been cancelled
release_nightly / clippy_windows (push) Has been cancelled
release_nightly / bundle_linux_aarch64 (push) Has been cancelled
release_nightly / bundle_linux_x86_64 (push) Has been cancelled
release_nightly / bundle_mac_aarch64 (push) Has been cancelled
release_nightly / bundle_mac_x86_64 (push) Has been cancelled
release_nightly / bundle_windows_aarch64 (push) Has been cancelled
release_nightly / bundle_windows_x86_64 (push) Has been cancelled
release_nightly / build_nix_linux_x86_64 (push) Has been cancelled
release_nightly / build_nix_mac_aarch64 (push) Has been cancelled
release_nightly / update_nightly_tag (push) Has been cancelled
Hotfix Review Monitor / check-hotfix-reviews (push) Has been cancelled
Stale PR Review Reminder / check-stale-prs (push) Has been cancelled
Update Weekly Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Bump collab-staging Tag / update-collab-staging-tag (push) Has been cancelled
compliance_check / scheduled_compliance_check (push) Has been cancelled
logiguard fork: GPUI xdg-activation keyboard-focus serial fix
Single-commit orphan branch: full zed-industries/zed @ 8c74db0 source tree
with a 3-file patch applied (no upstream history).

Patch (crates/gpui_linux/src/linux/wayland/):
  - serial.rs: add SerialKind::KeyboardEnter
  - client.rs: store wl_keyboard.enter serial; add latest_serial_of()
  - window.rs: activate() uses keyboard-enter serial (Mutter focus gate)

Mutter honors window activation only when the token carries the keyboard-
focus serial from wl_keyboard.enter; GPUI used a stale mouse-press serial.
See docs/tray-window-focus-wayland.md in logiguard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 02:22:17 +03:30

2.1 KiB

title, description
title description
Diagnostics - Errors and Warnings in Zed View and navigate errors, warnings, and code diagnostics from language servers in Zed.

Diagnostics

Zed gets its diagnostics from the language servers and supports both push and pull variants of the LSP which makes it compatible with all existing language servers.

Regular diagnostics

By default, Zed displays all diagnostics as underlined text in the editor and the scrollbar.

Editor diagnostics could be filtered with the

"diagnostics_max_severity": null

editor setting (possible values: "off", "error", "warning", "info", "hint", null (default, all diagnostics)).

The scrollbar ones are configured with the

"scrollbar": {
  "diagnostics": "all",
}

configuration (possible values: "none", "error", "warning", "information", "all" (default))

The diagnostics could be hovered to display a tooltip with full, rendered diagnostic message. Or, editor::GoToDiagnostic and editor::GoToPreviousDiagnostic could be used to navigate between diagnostics in the editor, showing a popover for the currently active diagnostic.

Inline diagnostics (Error lens)

Zed supports showing diagnostic as lens to the right of the code. This is disabled by default, but can either be temporarily turned on (or off) using the editor menu, or permanently, using the

"diagnostics": {
  "inline": {
    "enabled": true,
    "max_severity": null, // same values as the `diagnostics_max_severity` from the editor settings
  }
}

Other UI places

Project Panel

Project panel can have its entries coloured based on the severity of the diagnostics in the file.

To configure, use

"project_panel": {
  "show_diagnostics": "all",
}

configuration (possible values: "off", "errors", "all" (default))

Editor tabs

Similar to the project panel, editor tabs can be colorized with the

"tabs": {
  "show_diagnostics": "off",
}

configuration (possible values: "off" (default), "errors", "all")