2023-10-28 14:34:00 +00:00
|
|
|
import * as lc from "vscode-languageclient/node";
|
2023-11-07 15:33:45 +00:00
|
|
|
import * as vscode from "vscode";
|
2023-10-28 14:34:00 +00:00
|
|
|
|
|
|
|
export class RaLanguageClient extends lc.LanguageClient {
|
|
|
|
override error(message: string, data?: any, showNotification?: boolean | "force"): void {
|
|
|
|
// ignore `Request TYPE failed.` errors
|
2023-11-07 15:33:45 +00:00
|
|
|
const showError = vscode.workspace
|
|
|
|
.getConfiguration("rust-analyzer")
|
|
|
|
.get("showRequestFailedErrorNotification");
|
|
|
|
if (!showError && message.startsWith("Request") && message.endsWith("failed.")) {
|
2023-10-28 14:34:00 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
super.error(message, data, showNotification);
|
|
|
|
}
|
|
|
|
}
|