Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
update @apply diagnostics
Brad Cornes <brad@parall.ax>
4 years ago
1 changed files, 8 additions(+), 0 deletions(-)
M src/lsp/providers/diagnosticsProvider.ts -> src/lsp/providers/diagnosticsProvider.ts
diff --git a/src/lsp/providers/diagnosticsProvider.ts b/src/lsp/providers/diagnosticsProvider.ts
index 51565e9c5cb5a4d1f3291a37a4c28d99a220d47d..66e0f4cdc90d8f09bd9c9c619e8177875cae5ba9 100644
--- a/src/lsp/providers/diagnosticsProvider.ts
+++ b/src/lsp/providers/diagnosticsProvider.ts
@@ -17,9 +17,17 @@     .map(({ className, range }) => {
       const parts = getClassNameParts(state, className)
       if (!parts) return null
 import {
+import {
+import {
 import { findClassNamesInRange } from '../util/find'
       let message: string
+
+import { State } from '../util/state'
   TextDocument,
+        message = `\`@apply\` cannot be used with \`.${className}\` because it is included in multiple rulesets.`
+      } else if (info.__source !== 'utilities') {
+        message = `\`@apply\` cannot be used with \`.${className}\` because it is not a utility.`
+      } else if (info.__context && info.__context.length > 0) {
         if (info.__context.length === 1) {
           message = `\`@apply\` cannot be used with \`.${className}\` because it is nested inside of an at-rule (${info.__context[0]}).`
         } else {