From 28df377759ee5625b0dad4c797be306c8d2624e3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 6 Sep 2019 16:25:24 +0300 Subject: add option to disable notify --- editors/code/package.json | 5 +++++ editors/code/src/config.ts | 4 ++++ editors/code/src/server.ts | 1 + 3 files changed, 10 insertions(+) (limited to 'editors/code') diff --git a/editors/code/package.json b/editors/code/package.json index e2bc72f32..7a48d6794 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -205,6 +205,11 @@ "default": [], "description": "Paths to exclude from analysis" }, + "rust-analyzer.useClientWatching": { + "type": "boolean", + "default": false, + "description": "client provided file watching instead of notify watching." + }, "rust-analyzer.cargo-watch.arguments": { "type": "string", "description": "`cargo-watch` arguments. (e.g: `--features=\"shumway,pdf\"` will run as `cargo watch -x \"check --features=\"shumway,pdf\"\"` )", diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 570ddca46..a4581485c 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -23,6 +23,7 @@ export class Config { public lruCapacity: null | number = null; public displayInlayHints = true; public excludeGlobs = []; + public useClientWatching = false; public featureFlags = {}; public cargoWatchOptions: CargoWatchOptions = { enableOnStartup: 'ask', @@ -133,6 +134,9 @@ export class Config { if (config.has('excludeGlobs')) { this.excludeGlobs = config.get('excludeGlobs') || []; } + if (config.has('useClientWatching')) { + this.useClientWatching = config.get('useClientWatching') || false; + } if (config.has('featureFlags')) { this.featureFlags = config.get('featureFlags') || {}; } diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index 0d2a99c70..ff50fcd99 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -46,6 +46,7 @@ export class Server { Server.config.showWorkspaceLoadedNotification, lruCapacity: Server.config.lruCapacity, excludeGlobs: Server.config.excludeGlobs, + useClientWatching: Server.config.useClientWatching, featureFlags: Server.config.featureFlags }, traceOutputChannel -- cgit v1.2.3