We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56a0021 commit 91a1a83Copy full SHA for 91a1a83
crates/rust-analyzer/src/handlers.rs
@@ -1129,7 +1129,14 @@ pub(crate) fn publish_diagnostics(
1129
range: to_proto::range(&line_index, d.range),
1130
severity: Some(to_proto::diagnostic_severity(d.severity)),
1131
code: d.code.map(|d| d.as_str().to_owned()).map(NumberOrString::String),
1132
- code_description: None,
+ code_description: d.code.and_then(|code| {
1133
+ lsp_types::Url::parse(&format!(
1134
+ "https://rust-analyzer.github.io/manual.html#{}",
1135
+ code.as_str()
1136
+ ))
1137
+ .ok()
1138
+ .map(|href| lsp_types::CodeDescription { href })
1139
+ }),
1140
source: Some("rust-analyzer".to_string()),
1141
message: d.message,
1142
related_information: None,
0 commit comments