Move empty diagnostics workaround back into the server

This commit is contained in:
Lukas Wirth 2022-08-28 11:54:46 +02:00
parent 55bf51df41
commit 9ad0a8c467
2 changed files with 26 additions and 17 deletions

View file

@ -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,