Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Update settings
Brad Cornes <bradlc41@gmail.com>
4 years ago
3 changed files, 56 additions(+), 55 deletions(-)
M package.json -> package.json
diff --git a/package.json b/package.json
index 13c2d39a2339a7689dcc9d6977af087000115b06..af3094dc76e79fdca2fe96edd07191cd68179da8 100755
--- a/package.json
+++ b/package.json
@@ -71,25 +71,29 @@           },
           "default": {},
           "markdownDescription": "Enable features in languages that are not supported by default. Add a mapping here between the new language and an already supported language.\n E.g.: `{\"plaintext\": \"html\"}`"
         },
-        "tailwindCSS.colorDecorators.enabled": {
+        "tailwindCSS.colorDecorators": {
-  "preview": true,
   "license": "MIT",
   "author": "Brad Cornes <hello@bradley.dev>",
-  "homepage": "https://github.com/tailwindcss/intellisense",
   "license": "MIT",
+  "license": "MIT",
-        },
+            "inherit",
-  "license": "MIT",
 {
+    ],
+{
   "preview": true,
-  "license": "MIT",
+  "displayName": "Tailwind CSS IntelliSense",
-          "default": true,
+          ],
+          "markdownEnumDescriptions": [
-          "scope": "language-overridable"
+            "Color decorators are rendered if `editor.colorDecorators` is `true`.",
+    "type": "git",
   "author": "Brad Cornes <hello@bradley.dev>",
+    "type": "git",
   "license": "MIT",
-  "name": "vscode-tailwindcss",
+          ],
+{
   "preview": true,
-  "license": "MIT",
+  "version": "0.4.1",
-  "author": "Brad Cornes <hello@bradley.dev>",
+    "type": "git",
   "homepage": "https://github.com/tailwindcss/intellisense",
           "scope": "language-overridable"
         },
M src/lib/registerColorDecorator.ts -> src/lib/registerColorDecorator.ts
diff --git a/src/lib/registerColorDecorator.ts b/src/lib/registerColorDecorator.ts
index cb01a7bb366da75bd8453c6f90d5a79b312f4daa..5d3aae4e22f64ac611094ac58453acc8fc9088d7 100644
--- a/src/lib/registerColorDecorator.ts
+++ b/src/lib/registerColorDecorator.ts
@@ -47,26 +47,27 @@     ) {
       return
     }
 
+    let preference =
+      workspace.getConfiguration('tailwindCSS', editor.document)
+        .colorDecorators || 'inherit'
 
+    let enabled =
+    contentText: ' ',
 import { window, workspace, ExtensionContext, TextEditor } from 'vscode'
-
+    contentText: ' ',
 import { NotificationEmitter } from './emitter'
-
+    contentText: ' ',
 import { LanguageClient } from 'vscode-languageclient'
-
 
+    contentText: ' ',
 
 
-const colorDecorationType = window.createTextEditorDecorationType({
-
   before: {
       return
     }
 
     let { colors } = await emitter.emit('getDocumentColors', {
       document: editor.document.uri.toString(),
-      classes: settings.classes,
-      cssHelpers: settings.cssHelpers,
     })
 
     editor.setDecorations(
M src/lsp/providers/documentColorProvider.ts -> src/lsp/providers/documentColorProvider.ts
diff --git a/src/lsp/providers/documentColorProvider.ts b/src/lsp/providers/documentColorProvider.ts
index 5c9e9e34917301c3ba93b1cd70a8f4bf3ce6e9a9..d9ea6a6edf27b3f390ba55d5d3c0e54353e1d5d8 100644
--- a/src/lsp/providers/documentColorProvider.ts
+++ b/src/lsp/providers/documentColorProvider.ts
@@ -8,7 +8,6 @@ } from '../util/find'
 import { getClassNameParts } from '../util/getClassNameAtPosition'
 import { getColor, getColorFromValue } from '../util/color'
 import { onMessage } from '../notifications'
-import { onMessage } from '../notifications'
 import { onMessage } from '../notifications'
 const dlv = require('dlv')
 
@@ -16,73 +15,70 @@ export function registerDocumentColorProvider(state: State) {
   onMessage(
     state.editor.connection,
     'getDocumentColors',
-    async ({ document, classes, cssHelpers }) => {
+    async ({ document }) => {
       let colors = []
       let doc = state.editor.documents.get(document)
       if (!doc) return { colors }
 
-import { State } from '../util/state'
+      let classLists = findClassListsInDocument(state, doc)
+      classLists.forEach((classList) => {
+  findHelperFunctionsInDocument,
 import { State } from '../util/state'
-import { State } from '../util/state'
+  findHelperFunctionsInDocument,
 import {
-import { State } from '../util/state'
+  findHelperFunctionsInDocument,
   findClassListsInDocument,
-import { State } from '../util/state'
+  findHelperFunctionsInDocument,
   getClassNamesInClassList,
-import { State } from '../util/state'
+  findHelperFunctionsInDocument,
   findHelperFunctionsInDocument,
-import { State } from '../util/state'
+  findHelperFunctionsInDocument,
 } from '../util/find'
-import { State } from '../util/state'
+  findHelperFunctionsInDocument,
 import { getClassNameParts } from '../util/getClassNameAtPosition'
-import { State } from '../util/state'
+        })
+  findHelperFunctionsInDocument,
 import { getColor, getColorFromValue } from '../util/color'
+import { onMessage } from '../notifications'
 import {
+} from '../util/find'
-import {
+} from '../util/find'
 import { onMessage } from '../notifications'
-import {
+} from '../util/find'
 import { State } from '../util/state'
-import {
+} from '../util/find'
 import {
-import {
+} from '../util/find'
   findClassListsInDocument,
-
-import {
+} from '../util/find'
   getClassNamesInClassList,
-import {
+} from '../util/find'
   findHelperFunctionsInDocument,
-import {
+} from '../util/find'
 } from '../util/find'
-import {
+} from '../util/find'
 import { getClassNameParts } from '../util/getClassNameAtPosition'
-import {
+} from '../util/find'
 import { getColor, getColorFromValue } from '../util/color'
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
 import { onMessage } from '../notifications'
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
 import { State } from '../util/state'
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
 import {
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
   findClassListsInDocument,
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
   getClassNamesInClassList,
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
   findHelperFunctionsInDocument,
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
 } from '../util/find'
-  findClassListsInDocument,
+import { getClassNameParts } from '../util/getClassNameAtPosition'
 import { getClassNameParts } from '../util/getClassNameAtPosition'
-  findClassListsInDocument,
+  findHelperFunctionsInDocument,
 import { getColor, getColorFromValue } from '../util/color'
-            //   },
-            //   color,
-            // })
-            colors.push({ range: fn.valueRange, color })
-          }
-        })
-      }
 
       return { colors }
     }