Show diagnostic codes (#29296)
Closes #28135 Closes #4388 Closes #28136 Release Notes: - diagnostics: Show the diagnostic code if available --------- Co-authored-by: Neo Nie <nihgwu@live.com> Co-authored-by: Zed AI <ai+claude-3.7@zed.dev>
This commit is contained in:
parent
8836c6fb42
commit
9d10489607
13 changed files with 517 additions and 327 deletions
|
@ -208,6 +208,7 @@ pub struct Diagnostic {
|
|||
pub source: Option<String>,
|
||||
/// A machine-readable code that identifies this diagnostic.
|
||||
pub code: Option<NumberOrString>,
|
||||
pub code_description: Option<lsp::Url>,
|
||||
/// Whether this diagnostic is a hint, warning, or error.
|
||||
pub severity: DiagnosticSeverity,
|
||||
/// The human-readable message associated with this diagnostic.
|
||||
|
@ -4612,6 +4613,7 @@ impl Default for Diagnostic {
|
|||
Self {
|
||||
source: Default::default(),
|
||||
code: None,
|
||||
code_description: None,
|
||||
severity: DiagnosticSeverity::ERROR,
|
||||
message: Default::default(),
|
||||
group_id: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue