diff options
| author | jprochazk <1665677+jprochazk@users.noreply.github.com> | 2023-11-07 16:33:45 +0100 |
|---|---|---|
| committer | jprochazk <1665677+jprochazk@users.noreply.github.com> | 2023-11-07 16:33:45 +0100 |
| commit | c566136854734ff32ddaaed107c74759a3a3862f (patch) | |
| tree | 762ea20cfa5cf00dbdbedc29454ab8ab62eaae42 /editors/code/src | |
| parent | 3e4de963a2f932a4591b037e6b5933ac5903b7e3 (diff) | |
| download | rust-c566136854734ff32ddaaed107c74759a3a3862f.tar.gz rust-c566136854734ff32ddaaed107c74759a3a3862f.zip | |
add configuration option
Diffstat (limited to 'editors/code/src')
| -rw-r--r-- | editors/code/src/client.ts | 2 | ||||
| -rw-r--r-- | editors/code/src/lang_client.ts (renamed from editors/code/src/base_client.ts) | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index ed7066a1b7b..c27a446b380 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -10,7 +10,7 @@ import { type Config, prepareVSCodeConfig } from "./config"; import { randomUUID } from "crypto"; import { sep as pathSeparator } from "path"; import { unwrapUndefinable } from "./undefinable"; -import { RaLanguageClient } from "./base_client"; +import { RaLanguageClient } from "./lang_client"; export interface Env { [name: string]: string; diff --git a/editors/code/src/base_client.ts b/editors/code/src/lang_client.ts index 085920fb660..e28330e6dba 100644 --- a/editors/code/src/base_client.ts +++ b/editors/code/src/lang_client.ts @@ -1,9 +1,13 @@ 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 - if (message.startsWith("Request") && message.endsWith("failed.")) { + const showError = vscode.workspace + .getConfiguration("rust-analyzer") + .get("showRequestFailedErrorNotification"); + if (!showError && message.startsWith("Request") && message.endsWith("failed.")) { return; } |
