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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user