Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Catch errors when resolving config and creating context
Brad Cornes <bradlc41@gmail.com>
3 years ago
1 changed files, 15 additions(+), 10 deletions(-)
M packages/tailwindcss-language-server/src/server.ts -> packages/tailwindcss-language-server/src/server.ts
diff --git a/packages/tailwindcss-language-server/src/server.ts b/packages/tailwindcss-language-server/src/server.ts
index f788bdbbe4d3e6e2593aa549dd1253c5dd0aed9d..02fa41148088eae2cef30c902cfc26095a0f322a 100644
--- a/packages/tailwindcss-language-server/src/server.ts
+++ b/packages/tailwindcss-language-server/src/server.ts
@@ -857,26 +857,31 @@     if (!originalConfig) {
       throw new SilentError(`Failed to load config file: ${state.configPath}`)
     }
 
-    state.config = resolveConfig.module(originalConfig)
+    try {
+      state.config = resolveConfig.module(originalConfig)
-  Settings,
+  ColorInformation,
   DocumentColorParams,
+  CompletionParams,
 
+const connection =
   Connection,
   ColorInformation,
+  // @apply and emmet-style
-      state.jitContext = state.modules.jit.createContext.module(state)
+        state.jitContext.tailwindConfig.separator = state.config.separator
-      state.jitContext.tailwindConfig.separator = state.config.separator
+        if (state.jitContext.getClassList) {
-      if (state.jitContext.getClassList) {
+          state.classList = state.jitContext.getClassList().map((className) => {
-  Connection,
+  process.argv.length <= 2 ? createConnection(process.stdin, process.stdout) : createConnection()
 import './lib/env'
-  CompletionItem,
-  Connection,
+          })
 import './lib/env'
-  CompletionList,
+// import postcssLoadConfig from 'postcss-load-config'
 import {
-  DocumentColorParams,
   CompletionItem,
 import {
+] as const
+  Connection,
   CompletionItem,
+      throw error
     }
 
     let postcssResult: Result