about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2019-08-06 13:34:28 +0200
committerAleksey Kladov <aleksey.kladov@gmail.com>2019-08-06 14:28:31 +0200
commitdeea8f52d9803bb8a93d5dbd935970a20f07a51e (patch)
tree989408695c8c7347d4c9e907cf3f8feff7f2a982 /editors/code/src
parent058c2daba1b81804d9f803e57c72f5702c124d9e (diff)
downloadrust-deea8f52d9803bb8a93d5dbd935970a20f07a51e.tar.gz
rust-deea8f52d9803bb8a93d5dbd935970a20f07a51e.zip
allow to exclude certain files and directories
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/config.ts4
-rw-r--r--editors/code/src/server.ts3
2 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 4d58a1a9361..4df6b50ef79 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -22,6 +22,7 @@ export class Config {
     public showWorkspaceLoadedNotification = true;
     public lruCapacity: null | number = null;
     public displayInlayHints = true;
+    public excludeGlobs = [];
     public cargoWatchOptions: CargoWatchOptions = {
         enableOnStartup: 'ask',
         trace: 'off',
@@ -128,5 +129,8 @@ export class Config {
         if (config.has('displayInlayHints')) {
             this.displayInlayHints = config.get('displayInlayHints') as boolean;
         }
+        if (config.has('excludeGlobs')) {
+            this.excludeGlobs = config.get('excludeGlobs') || [];
+        }
     }
 }
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts
index 7029142fdcd..2b4c25c2844 100644
--- a/editors/code/src/server.ts
+++ b/editors/code/src/server.ts
@@ -36,7 +36,8 @@ export class Server {
                 publishDecorations: true,
                 showWorkspaceLoaded:
                     Server.config.showWorkspaceLoadedNotification,
-                lruCapacity: Server.config.lruCapacity
+                lruCapacity: Server.config.lruCapacity,
+                excludeGlobs: Server.config.excludeGlobs
             },
             traceOutputChannel
         };