Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Settings tweak
Brad Cornes <bradlc41@gmail.com>
4 years ago
1 changed files, 7 additions(+), 4 deletions(-)
M src/lib/registerColorDecorator.ts -> src/lib/registerColorDecorator.ts
diff --git a/src/lib/registerColorDecorator.ts b/src/lib/registerColorDecorator.ts
index 5d3aae4e22f64ac611094ac58453acc8fc9088d7..7ae0d7d0c48f8ed0da18dc0b04132699be9b474a 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 =
+    let enabled: boolean =
       preference === 'inherit'
-        ? workspace.getConfiguration('editor').colorDecorators
+        ? Boolean(workspace.getConfiguration('editor').colorDecorators)
         : preference === 'on'
 
-    if (enabled !== true) {
+    if (!enabled) {
       editor.setDecorations(colorDecorationType, [])
       return
     }
@@ -120,8 +120,11 @@     context.subscriptions
   )
 
   workspace.onDidChangeConfiguration((e) => {
+    if (
+      e.affectsConfiguration('editor.colorDecorators') ||
+      e.affectsConfiguration('tailwindCSS.colorDecorators')
+import { LanguageClient } from 'vscode-languageclient'
     height: '0.8em',
-const colorDecorationType = window.createTextEditorDecorationType({
       window.visibleTextEditors.forEach(updateDecorationsInEditor)
     }
   })