| 349 | } |
| 350 | |
| 351 | PluginRequestHandle LSPClientPlugin::processDocumentFormatting( const PluginMessage& msg ) { |
| 352 | if ( !msg.isBroadcast() || !msg.isJSON() ) |
| 353 | return {}; |
| 354 | |
| 355 | auto server = getServerURIFromTextDocumentURI( mClientManager, msg.asJSON() ); |
| 356 | if ( !server.server ) |
| 357 | return {}; |
| 358 | |
| 359 | if ( !msg.asJSON().contains( "options" ) ) |
| 360 | return {}; |
| 361 | |
| 362 | auto ret = server.server->documentFormatting( |
| 363 | server.uri, msg.asJSON()["options"], |
| 364 | [this, server]( const PluginIDType&, const std::vector<LSPTextEdit>& edits ) { |
| 365 | mManager->getSplitter()->getUISceneNode()->runOnMainThread( |
| 366 | [this, server, edits] { processDocumentFormattingResponse( server.uri, edits ); } ); |
| 367 | } ); |
| 368 | |
| 369 | return ret; |
| 370 | } |
| 371 | |
| 372 | PluginRequestHandle LSPClientPlugin::processWorkspaceSymbol( const PluginMessage& msg ) { |
| 373 | if ( !msg.isRequest() || !msg.isJSON() ) |
nothing calls this directly
no test coverage detected