| 56 | } |
| 57 | |
| 58 | void CodeActionService::Reformat(lsp::Diagnostic &diagnostic, std::shared_ptr<lsp::CodeActionParams> param, |
| 59 | std::shared_ptr<lsp::CodeActionResult> result) { |
| 60 | auto &action = result->actions.emplace_back(); |
| 61 | std::string title = "Reformat current line"; |
| 62 | action.title = title; |
| 63 | action.command.title = title; |
| 64 | action.command.command = _owner->GetService<CommandService>()->GetCommand(CommandService::Command::Reformat); |
| 65 | action.command.arguments.emplace_back(param->textDocument.uri); |
| 66 | action.command.arguments.push_back(param->range.Serialize()); |
| 67 | |
| 68 | action.kind = lsp::CodeActionKind::QuickFix; |
| 69 | } |
| 70 | |
| 71 | void CodeActionService::Spell(lsp::Diagnostic &diagnostic, std::shared_ptr<lsp::CodeActionParams> param, |
| 72 | std::shared_ptr<lsp::CodeActionResult> result) { |
nothing calls this directly
no test coverage detected