LSP integration steps 1-4, part of 5.

This commit is contained in:
2025-12-01 20:09:49 -08:00
parent ceef6af3ae
commit e089c6e4d1
56 changed files with 3685 additions and 1638 deletions

29
lsp/JsonRpcTransport.h Normal file
View File

@@ -0,0 +1,29 @@
/*
* JsonRpcTransport.h - placeholder transport for JSON-RPC over stdio (stub)
*/
#ifndef KTE_JSON_RPC_TRANSPORT_H
#define KTE_JSON_RPC_TRANSPORT_H
#include <optional>
#include <string>
namespace kte::lsp {
struct JsonRpcMessage {
std::string raw; // raw JSON payload (stub)
};
class JsonRpcTransport {
public:
JsonRpcTransport() = default;
~JsonRpcTransport() = default;
// Send a method call (request or notification) - stub does nothing
void send(const std::string &method, const std::string &payload);
// Blocking read next message (stub => returns nullopt)
std::optional<JsonRpcMessage> read();
};
} // namespace kte::lsp
#endif // KTE_JSON_RPC_TRANSPORT_H