| 299 | } |
| 300 | |
| 301 | LSPPositionAndServer getLSPLocationFromJSON( LSPClientServerManager& manager, const json& data ) { |
| 302 | if ( !data.contains( "uri" ) || !data.contains( "position" ) ) |
| 303 | return {}; |
| 304 | |
| 305 | TextPosition position( LSPConverter::parsePosition( data["position"] ) ); |
| 306 | if ( !position.isValid() ) |
| 307 | return {}; |
| 308 | |
| 309 | URI uri( data["uri"] ); |
| 310 | auto server = manager.getOneLSPClientServer( uri ); |
| 311 | if ( !server ) |
| 312 | return {}; |
| 313 | return { { uri, position }, server }; |
| 314 | } |
| 315 | |
| 316 | PluginRequestHandle LSPClientPlugin::processCodeCompletionRequest( const PluginMessage& msg ) { |
| 317 | if ( !msg.isRequest() || !msg.isJSON() ) |
no test coverage detected