ecode: More minor improvements to the LSP plugin. Added rustfmt formatter, and added rust-analyzer LSP. Fixed plugins exit.

This commit is contained in:
Martín Lucas Golini
2022-11-06 03:13:27 -03:00
parent 4fb79c2771
commit eded28f70b
10 changed files with 63 additions and 53 deletions

View File

@@ -108,6 +108,13 @@ void PluginManager::setWorkspaceFolder( const std::string& workspaceFolder ) {
json{ { "folder", mWorkspaceFolder } } );
}
void PluginManager::pushNotification( UICodeEditorPlugin* pluginWho, Notification notification,
const nlohmann::json& json ) const {
for ( const auto& plugin : mSubscribedPlugins )
if ( pluginWho->getId() != plugin.first )
plugin.second( notification, json );
}
void PluginManager::subscribeNotifications(
UICodeEditorPlugin* plugin,
std::function<void( Notification, const nlohmann::json& )> cb ) const {