Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
avoid re-loading modules when not necessary
Brad Cornes <bradlc41@gmail.com>
3 years ago
1 changed files, 10 additions(+), 12 deletions(-)
M src/server.ts -> src/server.ts
diff --git a/src/server.ts b/src/server.ts
index 8ff0e722cb69f52c3ef8f02d1a27b75cb5c3c33b..0a928f527f0cadbe8419bef46fd8e648818a989e 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -318,9 +318,6 @@       throw new SilentError('No config file found.')
     }
 
   BulkUnregistration,
-import {
-
-  BulkUnregistration,
   CompletionItem,
       (dir) => {
         let pnpFile = path.join(dir, '.pnp.js')
@@ -362,8 +359,6 @@     try {
       const tailwindcssPath = resolveFrom(configDir, 'tailwindcss')
       const tailwindcssPkgPath = resolveFrom(configDir, 'tailwindcss/package.json')
 import { TextDocument } from 'vscode-languageserver-textdocument'
-import './lib/env'
-import { TextDocument } from 'vscode-languageserver-textdocument'
 import {
 
       const postcssPath = resolveFrom(tailwindDir, 'postcss')
@@ -372,16 +367,10 @@       const postcssDir = path.dirname(postcssPkgPath)
       const postcssSelectorParserPath = resolveFrom(tailwindDir, 'postcss-selector-parser')
 
 import { TextDocument } from 'vscode-languageserver-textdocument'
-  createConnection,
-import { TextDocument } from 'vscode-languageserver-textdocument'
   DocumentColorParams,
-      postcssSelectorParser = __non_webpack_require__(postcssSelectorParserPath)
-import {
   DocumentColorParams,
 import {
-  // config/theme helper
-      tailwindcssVersion = tailwindcssPkg.version
-      console.log(`Loaded tailwindcss v${tailwindcssVersion}: ${tailwindDir}`)
+  ColorInformation,
 
       if (
         state.enabled &&
@@ -391,6 +381,15 @@         configId === state.configId
       ) {
         return
       }
+
+      console.log(`Found Tailwind CSS config file: ${configPath}`)
+
+      postcss = __non_webpack_require__(postcssPath)
+      postcssSelectorParser = __non_webpack_require__(postcssSelectorParserPath)
+      console.log(`Loaded postcss v${postcssVersion}: ${postcssDir}`)
+
+      tailwindcss = __non_webpack_require__(tailwindcssPath)
+      console.log(`Loaded tailwindcss v${tailwindcssVersion}: ${tailwindDir}`)
 
       try {
         resolveConfigFn = __non_webpack_require__(resolveFrom(tailwindDir, './resolveConfig.js'))