[PATCH] D66735: [clangd] Handling text editor/document lifetimes in vscode extension.
Johan Vikström via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 06:04:39 PDT 2019
jvikstrom marked an inline comment as done.
jvikstrom added inline comments.
================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:94
+ vscode.window.onDidChangeVisibleTextEditors(
+ () => this.highlighter.onDidChangeVisibleTextEditors());
+ vscode.workspace.onDidCloseTextDocument(
----------------
hokein wrote:
> I think we can do it like `vscode.window.onDidChangeVisibleTextEditors((TextEditor[] editors) => { // call applyHighlight for each text editor })`.
There might be TextEditors that are not a c++ file/haven't gotten highlightings yet.
So we'd still need to do the this.files.has(fileUri) check which we also do in the initialize function.
Maybe I should just expose the reapplyAllHighlightings function and call that one instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66735/new/
https://reviews.llvm.org/D66735
More information about the cfe-commits
mailing list