(
&self,
params: DocumentHighlightParams,
)
| 818 | } |
| 819 | |
| 820 | async fn document_highlight( |
| 821 | &self, |
| 822 | params: DocumentHighlightParams, |
| 823 | ) -> Result<Option<Vec<DocumentHighlight>>> { |
| 824 | let uri = params |
| 825 | .text_document_position_params |
| 826 | .text_document |
| 827 | .uri |
| 828 | .to_string(); |
| 829 | let position = params.text_document_position_params.position; |
| 830 | |
| 831 | let backend = self.clone_for_blocking(); |
| 832 | let uri_clone = uri.clone(); |
| 833 | tokio::task::spawn_blocking(move || { |
| 834 | backend.handle_with_position( |
| 835 | "document_highlight", |
| 836 | &uri_clone, |
| 837 | position, |
| 838 | |content, pos| { |
| 839 | backend |
| 840 | .handle_document_highlight(&uri_clone, content, pos) |
| 841 | .map(|highlights| { |
| 842 | highlights |
| 843 | .into_iter() |
| 844 | .map(|h| { |
| 845 | let mut h = h; |
| 846 | h.range.start = |
| 847 | backend.translate_php_to_blade(&uri_clone, h.range.start); |
| 848 | h.range.end = |
| 849 | backend.translate_php_to_blade(&uri_clone, h.range.end); |
| 850 | h |
| 851 | }) |
| 852 | .collect() |
| 853 | }) |
| 854 | }, |
| 855 | ) |
| 856 | }) |
| 857 | .await |
| 858 | .unwrap_or(Ok(None)) |
| 859 | } |
| 860 | |
| 861 | async fn linked_editing_range( |
| 862 | &self, |
nothing calls this directly
no test coverage detected