File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
tailwindcss-language-server/src
tailwindcss-language-service/src/util Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ export async function createProjectService(
216
216
217
217
let state : State = {
218
218
enabled : false ,
219
+ features : [ ] ,
219
220
completionItemData : {
220
221
_projectKey : projectKey ,
221
222
} ,
@@ -466,6 +467,7 @@ export async function createProjectService(
466
467
// and this should be determined there and passed in instead
467
468
let features = supportedFeatures ( tailwindcssVersion , tailwindcss )
468
469
log ( `supported features: ${ JSON . stringify ( features ) } ` )
470
+ state . features = features
469
471
470
472
if ( ! features . includes ( 'css-at-theme' ) ) {
471
473
tailwindcss = tailwindcss . default ?? tailwindcss
@@ -692,6 +694,7 @@ export async function createProjectService(
692
694
state . v4 = true
693
695
state . v4Fallback = true
694
696
state . jit = true
697
+ state . features = features
695
698
state . modules = {
696
699
tailwindcss : { version : tailwindcssVersion , module : tailwindcss } ,
697
700
postcss : { version : null , module : null } ,
@@ -1154,7 +1157,7 @@ export async function createProjectService(
1154
1157
} ,
1155
1158
tryInit,
1156
1159
async dispose ( ) {
1157
- state = { enabled : false }
1160
+ state = { enabled : false , features : [ ] }
1158
1161
for ( let disposable of disposables ) {
1159
1162
; ( await disposable ) . dispose ( )
1160
1163
}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { Postcss } from 'postcss'
4
4
import type { KeywordColor } from './color'
5
5
import type * as culori from 'culori'
6
6
import type { DesignSystem } from './v4'
7
+ import type { Feature } from '../features'
7
8
8
9
export type ClassNamesTree = {
9
10
[ key : string ] : ClassNamesTree
@@ -142,6 +143,7 @@ export interface State {
142
143
classListContainsMetadata ?: boolean
143
144
pluginVersions ?: string
144
145
completionItemData ?: Record < string , any >
146
+ features : Feature [ ]
145
147
// postcssPlugins?: { before: any[]; after: any[] }
146
148
}
147
149
@@ -223,6 +225,7 @@ export function createState(
223
225
) : State {
224
226
return {
225
227
enabled : true ,
228
+ features : [ ] ,
226
229
...partial ,
227
230
editor : {
228
231
get connection ( ) : Connection {
You can’t perform that action at this time.
0 commit comments