initialize method
Mixins should register their methods in this method, as well as editing the InitializeResult.capabilities as needed.
Implementation
@override
FutureOr<InitializeResult> initialize(InitializeRequest request) {
initialized.then((_) async {
if (!supportsRoots) {
log(
LoggingLevel.warning,
'Client does not support the roots capability, some functionality '
'may be disabled.',
);
} else {
if (supportsRootsChanged) {
rootsListChanged!.listen((event) {
updateRoots();
});
}
await updateRoots();
}
});
return super.initialize(request);
}