mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 23:25:03 +00:00
add configuration option
This commit is contained in:
parent
3e4de963a2
commit
c566136854
3 changed files with 11 additions and 2 deletions
16
editors/code/src/lang_client.ts
Normal file
16
editors/code/src/lang_client.ts
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue