♻️ 使用module重构所有代码
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include "./initialized.hpp"
|
||||
|
||||
namespace lsp::provider
|
||||
{
|
||||
|
||||
std::string Initialized::GetMethod() const
|
||||
{
|
||||
return "initialized";
|
||||
}
|
||||
|
||||
std::string Initialized::GetProviderName() const
|
||||
{
|
||||
return "Initialized";
|
||||
}
|
||||
|
||||
void Initialized::HandleNotification(const protocol::NotificationMessage& notification, [[maybe_unused]] ExecutionContext& context)
|
||||
{
|
||||
spdlog::debug("Initialized notification {}", notification.method);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
module;
|
||||
|
||||
|
||||
export module lsp.provider.initialized.initialized;
|
||||
import spdlog;
|
||||
|
||||
import std;
|
||||
|
||||
import lsp.provider.base.interface;
|
||||
import lsp.protocol;
|
||||
|
||||
export namespace lsp::provider
|
||||
{
|
||||
class Initialized : public INotificationProvider
|
||||
{
|
||||
public:
|
||||
Initialized() = default;
|
||||
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
||||
namespace lsp::provider
|
||||
{
|
||||
|
||||
std::string Initialized::GetMethod() const
|
||||
{
|
||||
return "initialized";
|
||||
}
|
||||
|
||||
std::string Initialized::GetProviderName() const
|
||||
{
|
||||
return "Initialized";
|
||||
}
|
||||
|
||||
void Initialized::HandleNotification(const protocol::NotificationMessage& notification, [[maybe_unused]] ExecutionContext& context)
|
||||
{
|
||||
spdlog::debug("Initialized notification {}", notification.method);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
#include "../base/interface.hpp"
|
||||
|
||||
namespace lsp::provider
|
||||
{
|
||||
class Initialized : public INotificationProvider
|
||||
{
|
||||
public:
|
||||
Initialized() = default;
|
||||
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user