This revision was automatically updated to reflect the committed changes.
Closed by commit rL370305: [clangd] Update themeRuleMatcher when color theme 
changes in vscode extension. (authored by jvikstrom, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D66406?vs=217785&id=217794#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66406/new/

https://reviews.llvm.org/D66406

Files:
  
clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/semantic-highlighting.ts


Index: 
clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
===================================================================
--- 
clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
+++ 
clang-tools-extra/trunk/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(


Index: clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
===================================================================
--- clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
+++ clang-tools-extra/trunk/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(
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to