[clangd] Update themeRuleMatcher when color theme changes in vscode extension.

Summary:
Add event listener that listens to configuration changes and reloads the ThemeRuleMatcher when the theme changes.

Right now it will not recolor the files, depends on the colorizer CL for that.

Reviewers: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66406

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@370305 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/clangd/clients/clangd-vscode/src/semantic-highlighting.ts b/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
index 2ac700e..27dfb8b 100644
--- a/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
+++ b/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
@@ -91,6 +91,13 @@
     // highlighter being created.
     this.highlighter = new Highlighter(this.scopeLookupTable);
     this.subscriptions.push(vscode.Disposable.from(this.highlighter));
+    // Adds a listener to reload the theme when it changes.
+    this.subscriptions.push(
+        vscode.workspace.onDidChangeConfiguration((conf) => {
+          if (!conf.affectsConfiguration('workbench.colorTheme'))
+            return;
+          this.loadCurrentTheme();
+        }));
     this.loadCurrentTheme();
     // Event handling for handling with TextDocuments/Editors lifetimes.
     this.subscriptions.push(vscode.window.onDidChangeVisibleTextEditors(