@@ -80,7 +80,7 @@ import {
80
80
normalizeDriveLetter ,
81
81
} from './utils'
82
82
import type { DocumentService } from './documents'
83
- import type { ProjectConfig } from './project-locator'
83
+ import { calculateDocumentSelectors , type ProjectConfig } from './project-locator'
84
84
import { supportedFeatures } from '@tailwindcss/language-service/src/features'
85
85
import { loadDesignSystem } from './util/v4'
86
86
import { readCssFile } from './util/css'
@@ -309,16 +309,11 @@ export async function createProjectService(
309
309
projectConfig . configPath &&
310
310
( isConfigFile || isDependency )
311
311
) {
312
- documentSelector = [
313
- ...documentSelector . filter (
314
- ( { priority } ) => priority !== DocumentSelectorPriority . CONTENT_FILE ,
315
- ) ,
316
- ...getContentDocumentSelectorFromConfigFile (
317
- projectConfig . configPath ,
318
- initialTailwindVersion ,
319
- projectConfig . folder ,
320
- ) ,
321
- ]
312
+ documentSelector = await calculateDocumentSelectors (
313
+ projectConfig . config ,
314
+ state . features ,
315
+ resolver ,
316
+ )
322
317
323
318
checkOpenDocuments ( )
324
319
}
@@ -965,17 +960,12 @@ export async function createProjectService(
965
960
966
961
/////////////////////
967
962
if ( ! projectConfig . isUserConfigured ) {
968
- documentSelector = [
969
- ...documentSelector . filter (
970
- ( { priority } ) => priority !== DocumentSelectorPriority . CONTENT_FILE ,
971
- ) ,
972
- ...getContentDocumentSelectorFromConfigFile (
973
- state . configPath ,
974
- tailwindcss . version ,
975
- projectConfig . folder ,
976
- originalConfig ,
977
- ) ,
978
- ]
963
+ documentSelector = await calculateDocumentSelectors (
964
+ projectConfig . config ,
965
+ state . features ,
966
+ resolver ,
967
+ originalConfig ,
968
+ )
979
969
}
980
970
//////////////////////
981
971
0 commit comments