1---
2title: Diagnostics - Errors and Warnings in Zed
3description: View and navigate errors, warnings, and code diagnostics from language servers in Zed.
4---
5
6# Diagnostics
7
8Zed 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.
9
10# Regular diagnostics
11
12By default, Zed displays all diagnostics as underlined text in the editor and the scrollbar.
13
14Editor diagnostics could be filtered with the
15
16```json [settings]
17"diagnostics_max_severity": null
18```
19
20editor setting (possible values: `"off"`, `"error"`, `"warning"`, `"info"`, `"hint"`, `null` (default, all diagnostics)).
21
22The scrollbar ones are configured with the
23
24```json [settings]
25"scrollbar": {
26 "diagnostics": "all",
27}
28```
29
30configuration (possible values: `"none"`, `"error"`, `"warning"`, `"information"`, `"all"` (default))
31
32The diagnostics could be hovered to display a tooltip with full, rendered diagnostic message.
33Or, `editor::GoToDiagnostic` and `editor::GoToPreviousDiagnostic` could be used to navigate between diagnostics in the editor, showing a popover for the currently active diagnostic.
34
35# Inline diagnostics (Error lens)
36
37Zed supports showing diagnostic as lens to the right of the code.
38This is disabled by default, but can either be temporarily turned on (or off) using the editor menu, or permanently, using the
39
40```json [settings]
41"diagnostics": {
42 "inline": {
43 "enabled": true,
44 "max_severity": null, // same values as the `diagnostics_max_severity` from the editor settings
45 }
46}
47```
48
49# Other UI places
50
51## Project Panel
52
53Project panel can have its entries coloured based on the severity of the diagnostics in the file.
54
55To configure, use
56
57```json [settings]
58"project_panel": {
59 "show_diagnostics": "all",
60}
61```
62
63configuration (possible values: `"off"`, `"errors"`, `"all"` (default))
64
65## Editor tabs
66
67Similar to the project panel, editor tabs can be colorized with the
68
69```json [settings]
70"tabs": {
71 "show_diagnostics": "off",
72}
73```
74
75configuration (possible values: `"off"` (default), `"errors"`, `"all"`)