(&self, params: CodeActionParams)
| 761 | } |
| 762 | |
| 763 | async fn code_action(&self, params: CodeActionParams) -> Result<Option<CodeActionResponse>> { |
| 764 | let uri = params.text_document.uri.to_string(); |
| 765 | |
| 766 | // Code actions are not yet Blade-aware (edits target virtual PHP |
| 767 | // coordinates and may insert code outside valid PHP regions). |
| 768 | // Disabled until Phase 2 component support lands. |
| 769 | if self.is_blade_file(&uri) { |
| 770 | return Ok(None); |
| 771 | } |
| 772 | |
| 773 | let backend = self.clone_for_blocking(); |
| 774 | let uri_clone = uri.clone(); |
| 775 | tokio::task::spawn_blocking(move || { |
| 776 | backend.handle_with_uri("code_action", &uri_clone, |content| { |
| 777 | let actions = backend.handle_code_action(&uri_clone, content, ¶ms); |
| 778 | if actions.is_empty() { |
| 779 | None |
| 780 | } else { |
| 781 | Some(actions) |
| 782 | } |
| 783 | }) |
| 784 | }) |
| 785 | .await |
| 786 | .unwrap_or(Ok(None)) |
| 787 | } |
| 788 | |
| 789 | async fn code_action_resolve(&self, action: CodeAction) -> Result<CodeAction> { |
| 790 | let (resolved, republish_uri) = self.resolve_code_action(action); |
nothing calls this directly
no test coverage detected