| 604 | } |
| 605 | |
| 606 | bool FormatterPlugin::tryRequestCapabilities( const std::shared_ptr<TextDocument>& doc ) { |
| 607 | const auto& language = doc->getSyntaxDefinition().getLSPName(); |
| 608 | auto it = mCapabilities.find( language ); |
| 609 | if ( it != mCapabilities.end() ) |
| 610 | return true; |
| 611 | json data; |
| 612 | data["language"] = language; |
| 613 | mManager->sendRequest( this, PluginMessageType::LanguageServerCapabilities, |
| 614 | PluginMessageFormat::JSON, &data ); |
| 615 | return false; |
| 616 | } |
| 617 | |
| 618 | PluginRequestHandle FormatterPlugin::processMessage( const PluginMessage& msg ) { |
| 619 | if ( msg.type == PluginMessageType::FileSystemListenerReady ) { |
nothing calls this directly
no test coverage detected