[PATCH] D66406: [clangd] Update themeRuleMatcher when color theme changes in vscode extension.
Johan Vikström via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 29 00:30:10 PDT 2019
jvikstrom updated this revision to Diff 217785.
jvikstrom marked an inline comment as done.
jvikstrom added a comment.
Use `conf.affectsConfiguration('workbench.colorTheme')` instead of keeping track of the old color theme manually.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66406/new/
https://reviews.llvm.org/D66406
Files:
clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
Index: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
===================================================================
--- clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
+++ clang-tools-extra/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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66406.217785.patch
Type: text/x-patch
Size: 971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190829/c593bd11/attachment.bin>
More information about the cfe-commits
mailing list