Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/lang_client.ts')
-rw-r--r--editors/code/src/lang_client.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/editors/code/src/lang_client.ts b/editors/code/src/lang_client.ts
new file mode 100644
index 0000000000..e28330e6db
--- /dev/null
+++ b/editors/code/src/lang_client.ts
@@ -0,0 +1,16 @@
+import * as lc from "vscode-languageclient/node";
+import * as vscode from "vscode";
+
+export class RaLanguageClient extends lc.LanguageClient {
+ override error(message: string, data?: any, showNotification?: boolean | "force"): void {
+ // ignore `Request TYPE failed.` errors
+ const showError = vscode.workspace
+ .getConfiguration("rust-analyzer")
+ .get("showRequestFailedErrorNotification");
+ if (!showError && message.startsWith("Request") && message.endsWith("failed.")) {
+ return;
+ }
+
+ super.error(message, data, showNotification);
+ }
+}