MCPcopy Create free account
hub / github.com/SpartanJ/eepp / getLSPLocationFromJSON

Function getLSPLocationFromJSON

src/tools/ecode/plugins/lsp/lspclientplugin.cpp:301–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301LSPPositionAndServer 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
316PluginRequestHandle LSPClientPlugin::processCodeCompletionRequest( const PluginMessage& msg ) {
317 if ( !msg.isRequest() || !msg.isJSON() )

Callers 2

Calls 4

parsePositionFunction · 0.85
getOneLSPClientServerMethod · 0.80
containsMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected