✨ feat(provider): add compile-time registry
This commit is contained in:
@@ -12,28 +12,22 @@ import lsp.provider.base.interface;
|
||||
|
||||
export namespace lsp::provider::telemetry
|
||||
{
|
||||
class Event : public INotificationProvider
|
||||
class Event : public AutoRegisterProvider<Event, INotificationProvider>
|
||||
{
|
||||
public:
|
||||
static constexpr std::string_view kMethod = "telemetry/event";
|
||||
static constexpr std::string_view kProviderName = "TelemetryEvent";
|
||||
Event() = default;
|
||||
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
||||
namespace lsp::provider::telemetry
|
||||
{
|
||||
std::string Event::GetMethod() const
|
||||
{
|
||||
return "telemetry/event";
|
||||
}
|
||||
|
||||
|
||||
std::string Event::GetProviderName() const
|
||||
{
|
||||
return "TelemetryEvent";
|
||||
}
|
||||
|
||||
|
||||
void Event::HandleNotification(const protocol::NotificationMessage& notification, [[maybe_unused]] ExecutionContext& context)
|
||||
{
|
||||
@@ -44,4 +38,4 @@ namespace lsp::provider::telemetry
|
||||
// 2. Update appropriate services/state
|
||||
// 3. Trigger any necessary side effects
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user