File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed
tailwindcss-language-server/src/language
tailwindcss-language-service/src Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
381
381
. filter ( ( diagnostic ) => {
382
382
if (
383
383
diagnostic . code === 'unknownAtRules' &&
384
- / U n k n o w n a t r u l e @ ( t a i l w i n d | a p p l y | c o n f i g | t h e m e | p l u g i n | s o u r c e ) / . test ( diagnostic . message )
384
+ / U n k n o w n a t r u l e @ ( t a i l w i n d | a p p l y | c o n f i g | t h e m e | p l u g i n | s o u r c e | u t i l i t y | v a r i a n t ) / . test ( diagnostic . message )
385
385
) {
386
386
return false
387
387
}
Original file line number Diff line number Diff line change @@ -1485,7 +1485,7 @@ function provideCssDirectiveCompletions(
1485
1485
} )
1486
1486
}
1487
1487
1488
- if ( semver . gte ( state . version , '4.0.0' ) ) {
1488
+ if ( state . v4 ) {
1489
1489
items . push ( {
1490
1490
label : '@theme' ,
1491
1491
documentation : {
@@ -1496,6 +1496,50 @@ function provideCssDirectiveCompletions(
1496
1496
) } )`,
1497
1497
} ,
1498
1498
} )
1499
+
1500
+ items . push ( {
1501
+ label : '@utility' ,
1502
+ documentation : {
1503
+ kind : 'markdown' as typeof MarkupKind . Markdown ,
1504
+ value : `Use the \`@utility\` directive to define a custom utility.\n\n[Tailwind CSS Documentation](${ docsUrl (
1505
+ state . version ,
1506
+ 'functions-and-directives/#utility' ,
1507
+ ) } )`,
1508
+ } ,
1509
+ } )
1510
+
1511
+ items . push ( {
1512
+ label : '@variant' ,
1513
+ documentation : {
1514
+ kind : 'markdown' as typeof MarkupKind . Markdown ,
1515
+ value : `Use the \`@variant\` directive to define a custom variant or override an existing one.\n\n[Tailwind CSS Documentation](${ docsUrl (
1516
+ state . version ,
1517
+ 'functions-and-directives/#variant' ,
1518
+ ) } )`,
1519
+ } ,
1520
+ } )
1521
+
1522
+ items . push ( {
1523
+ label : '@source' ,
1524
+ documentation : {
1525
+ kind : 'markdown' as typeof MarkupKind . Markdown ,
1526
+ value : `Use the \`@source\` directive to scan additional files for classes.\n\n[Tailwind CSS Documentation](${ docsUrl (
1527
+ state . version ,
1528
+ 'functions-and-directives/#source' ,
1529
+ ) } )`,
1530
+ } ,
1531
+ } )
1532
+
1533
+ items . push ( {
1534
+ label : '@plugin' ,
1535
+ documentation : {
1536
+ kind : 'markdown' as typeof MarkupKind . Markdown ,
1537
+ value : `Use the \`@plugin\` directive to include a JS plugin in your Tailwind CSS build.\n\n[Tailwind CSS Documentation](${ docsUrl (
1538
+ state . version ,
1539
+ 'functions-and-directives/#source' ,
1540
+ ) } )`,
1541
+ } ,
1542
+ } )
1499
1543
}
1500
1544
1501
1545
return withDefaults (
You can’t perform that action at this time.
0 commit comments