♻️ 使用module重构所有代码
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
module;
|
||||
|
||||
|
||||
export module lsp.provider.text_document.document_highlight;
|
||||
import spdlog;
|
||||
|
||||
import std;
|
||||
|
||||
import lsp.protocol;
|
||||
import lsp.codec.facade;
|
||||
import lsp.provider.base.interface;
|
||||
|
||||
export namespace lsp::provider::text_document
|
||||
{
|
||||
class DocumentHighlight : public IRequestProvider
|
||||
{
|
||||
public:
|
||||
DocumentHighlight() = default;
|
||||
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
std::string ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
||||
namespace lsp::provider::text_document
|
||||
{
|
||||
std::string DocumentHighlight::GetMethod() const
|
||||
{
|
||||
return "textDocument/documentHighlight";
|
||||
}
|
||||
|
||||
std::string DocumentHighlight::GetProviderName() const
|
||||
{
|
||||
return "TextDocumentDocumentHighlight";
|
||||
}
|
||||
|
||||
std::string DocumentHighlight::ProvideResponse(const protocol::RequestMessage& request, [[maybe_unused]] ExecutionContext& context)
|
||||
{
|
||||
spdlog::debug("TextDocumentDocumentHighlightProvider: Providing response for method {}", request.method);
|
||||
|
||||
// TODO: Implement the actual request handling logic
|
||||
// 1. Parse request parameters
|
||||
// 2. Process the request using appropriate services
|
||||
// 3. Return formatted response
|
||||
|
||||
return "{}"; // Placeholder response
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user