Allow disabling inlay hints

This commit is contained in:
Aleksey Kladov 2020-01-01 17:04:37 +01:00
parent d5a1a5e614
commit 8327049fae

View file

@ -41,10 +41,11 @@ const typeHintDecorationType = vscode.window.createTextEditorDecorationType({
class HintsUpdater { class HintsUpdater {
private pending: Map<string, vscode.CancellationTokenSource> = new Map(); private pending: Map<string, vscode.CancellationTokenSource> = new Map();
private ctx: Ctx; private ctx: Ctx;
private enabled = true; private enabled: boolean;
constructor(ctx: Ctx) { constructor(ctx: Ctx) {
this.ctx = ctx; this.ctx = ctx;
this.enabled = ctx.config.displayInlayHints;
} }
async setEnabled(enabled: boolean) { async setEnabled(enabled: boolean) {