feat(provider): add compile-time registry

This commit is contained in:
csh
2025-12-21 22:21:46 +08:00
parent f54050bad2
commit 2c1c1d8a88
82 changed files with 751 additions and 1001 deletions
+6 -12
View File
@@ -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
}
}
}