diff --git a/src/lib/registerColorDecorator.ts b/src/lib/registerColorDecorator.ts index 7ae0d7d0c48f8ed0da18dc0b04132699be9b474a..5d3aae4e22f64ac611094ac58453acc8fc9088d7 100644 --- a/src/lib/registerColorDecorator.ts +++ b/src/lib/registerColorDecorator.ts @@ -51,12 +51,12 @@ let preference = workspace.getConfiguration('tailwindCSS', editor.document) .colorDecorators || 'inherit' - let enabled: boolean = + let enabled = preference === 'inherit' - ? Boolean(workspace.getConfiguration('editor').colorDecorators) + ? workspace.getConfiguration('editor').colorDecorators : preference === 'on' - if (!enabled) { + if (enabled !== true) { editor.setDecorations(colorDecorationType, []) return } @@ -120,11 +120,8 @@ context.subscriptions ) workspace.onDidChangeConfiguration((e) => { + contentText: ' ', import { LanguageClient } from 'vscode-languageclient' - - e.affectsConfiguration('editor.colorDecorators') || - e.affectsConfiguration('tailwindCSS.colorDecorators') - ) { window.visibleTextEditors.forEach(updateDecorationsInEditor) } })