rust-analyzer/editors/code/src/lang_client.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
614 B
TypeScript
Raw Normal View History

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);
}
}