]> git.lizzy.rs Git - rust.git/commitdiff
Allow disabling sysroot
authorAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 9 Dec 2019 17:05:49 +0000 (18:05 +0100)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 9 Dec 2019 18:46:35 +0000 (19:46 +0100)
Might be helpful for debugging

editors/code/src/config.ts
editors/code/src/server.ts

index 95c3f42e50ff42a6b7084a9c67b5e5e4fb81478f..fb9e55dd6fe55ba88d943557a6ecf19ba959db61 100644 (file)
@@ -26,6 +26,8 @@ export class Config {
     public excludeGlobs = [];
     public useClientWatching = false;
     public featureFlags = {};
+    // for internal use
+    public withSysroot: null | boolean = null;
     public cargoWatchOptions: CargoWatchOptions = {
         enableOnStartup: 'ask',
         trace: 'off',
@@ -148,5 +150,8 @@ export class Config {
         if (config.has('featureFlags')) {
             this.featureFlags = config.get('featureFlags') || {};
         }
+        if (config.has('withSysroot')) {
+            this.withSysroot = config.get('withSysroot') || false;
+        }
     }
 }
index b346c08288d51a731a0d20fdf04d0e8ccd23b36a..e767b6f1b0d3ccc85fa80d0e742eb21c9dea649b 100644 (file)
@@ -57,7 +57,8 @@ export class Server {
                 maxInlayHintLength: Server.config.maxInlayHintLength,
                 excludeGlobs: Server.config.excludeGlobs,
                 useClientWatching: Server.config.useClientWatching,
-                featureFlags: Server.config.featureFlags
+                featureFlags: Server.config.featureFlags,
+                withSysroot: Server.config.withSysroot
             },
             traceOutputChannel
         };