lsp-server first commit

This commit is contained in:
csh
2025-06-23 20:29:48 +08:00
parent cbcff7d1b4
commit 4f5bf9d781
43 changed files with 1851 additions and 11 deletions
@@ -0,0 +1,23 @@
#include "./initialized_provider.hpp"
#include "../../lsp/logger.hpp"
namespace lsp::providers::initialized
{
nlohmann::json InitializedProvider::ProvideResponse(const LspRequest& request)
{
log::Debug("InitializedProvider: Providing response for method '", request.method, "' with id ", request.id);
return nlohmann::json();
}
inline std::string InitializedProvider::GetMethod() const
{
return "initialized";
}
inline std::string InitializedProvider::GetProviderName() const
{
return "InitializedProvider";
}
}
@@ -0,0 +1,14 @@
#pragma once
#include "../base/provider_interface.hpp"
namespace lsp::providers::initialized
{
class InitializedProvider : public ILspProvider
{
public:
InitializedProvider() = default;
nlohmann::json ProvideResponse(const LspRequest& request) override;
std::string GetMethod() const override;
std::string GetProviderName() const override;
};
}