mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Auto merge of #13133 - Veykril:diag-hack, r=Veykril
Move empty diagnostics workaround back into the server This only touches on the diagnostics in one place instead of multiple as was previously done, since all published diagnostics will go through this code path anyways. Closes https://github.com/rust-lang/rust-analyzer/issues/13130
This commit is contained in:
commit
e8e598f641
2 changed files with 26 additions and 17 deletions
|
@ -99,22 +99,6 @@ export async function createClient(
|
|||
traceOutputChannel: traceOutputChannel(),
|
||||
outputChannel: outputChannel(),
|
||||
middleware: {
|
||||
async handleDiagnostics(uri, diagnostics, next) {
|
||||
// Workaround for https://github.com/microsoft/vscode/issues/155531
|
||||
for (const diagnostic of diagnostics) {
|
||||
if (!diagnostic.message) {
|
||||
diagnostic.message = " ";
|
||||
}
|
||||
if (diagnostic.relatedInformation) {
|
||||
for (const relatedInformation of diagnostic.relatedInformation) {
|
||||
if (!relatedInformation.message) {
|
||||
relatedInformation.message = " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
next(uri, diagnostics);
|
||||
},
|
||||
async provideHover(
|
||||
document: vscode.TextDocument,
|
||||
position: vscode.Position,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue