@@ -1363,15 +1363,9 @@ impl Workspace for WorkspaceServer {
13631363 } : ChangeFileParams ,
13641364 ) -> Result < ChangeFileResult , WorkspaceError > {
13651365 let documents = self . documents . pin ( ) ;
1366- let ( index, existing_version, services ) = documents
1366+ let ( index, existing_version) = documents
13671367 . get ( path. as_path ( ) )
1368- . map ( |document| {
1369- (
1370- document. file_source_index ,
1371- document. version ,
1372- document. services . clone ( ) ,
1373- )
1374- } )
1368+ . map ( |document| ( document. file_source_index , document. version ) )
13751369 . ok_or_else ( WorkspaceError :: not_found) ?;
13761370
13771371 if existing_version. is_some_and ( |existing_version| existing_version >= version) {
@@ -1400,9 +1394,17 @@ impl Workspace for WorkspaceServer {
14001394 let mut node_cache = node_cache. unwrap_or_default ( ) ;
14011395
14021396 let parsed = self . parse ( & path, & content, & settings, index, & mut node_cache) ?;
1397+ let mut services = DocumentServices :: none ( ) ;
14031398 let root = parsed. any_parse . unwrap_as_send_node ( ) ;
14041399 let document_source =
14051400 self . get_file_source ( & path, settings. experimental_full_html_support_enabled ( ) ) ;
1401+ if document_source. is_css_like ( )
1402+ && ( settings. is_linter_enabled ( ) || settings. is_assist_enabled ( ) )
1403+ {
1404+ services = CssDocumentServices :: default ( )
1405+ . with_css_semantic_model ( & parsed. any_parse . tree ( ) )
1406+ . into ( ) ;
1407+ }
14061408
14071409 // Second-pass parsing for HTML files with embedded JavaScript and CSS content
14081410 let embedded_snippets = if DocumentFileSource :: can_contain_embeds (
0 commit comments