| 520 | } |
| 521 | |
| 522 | async fn did_close(&self, params: DidCloseTextDocumentParams) { |
| 523 | let uri = params.text_document.uri.to_string(); |
| 524 | |
| 525 | self.open_files.write().remove(&uri); |
| 526 | |
| 527 | // Clean up Blade preprocessor state for the closed file. |
| 528 | if self.is_blade_file(&uri) { |
| 529 | self.blade_virtual_content.write().remove(&uri); |
| 530 | self.blade_source_maps.write().remove(&uri); |
| 531 | self.blade_uris.write().remove(&uri); |
| 532 | } |
| 533 | |
| 534 | self.clear_file_maps(&uri); |
| 535 | |
| 536 | // Clear diagnostics so stale warnings don't linger after the file is closed |
| 537 | self.clear_diagnostics_for_file(&uri).await; |
| 538 | |
| 539 | self.log(MessageType::INFO, format!("Closed file: {}", uri)) |
| 540 | .await; |
| 541 | } |
| 542 | |
| 543 | async fn goto_definition( |
| 544 | &self, |