mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 01:21:57 +00:00
Move initialization Ipc structures into messages/
This commit is contained in:
parent
ad550f3f2c
commit
5093863b33
@ -86,8 +86,6 @@ void EmitDiagnostics(WorkingFiles* working_files,
|
|||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_IPC_MESSAGE(Ipc_CancelRequest);
|
REGISTER_IPC_MESSAGE(Ipc_CancelRequest);
|
||||||
REGISTER_IPC_MESSAGE(Ipc_InitializeRequest);
|
|
||||||
REGISTER_IPC_MESSAGE(Ipc_InitializedNotification);
|
|
||||||
REGISTER_IPC_MESSAGE(Ipc_Exit);
|
REGISTER_IPC_MESSAGE(Ipc_Exit);
|
||||||
REGISTER_IPC_MESSAGE(Ipc_TextDocumentDidOpen);
|
REGISTER_IPC_MESSAGE(Ipc_TextDocumentDidOpen);
|
||||||
REGISTER_IPC_MESSAGE(Ipc_CqueryTextDocumentDidView);
|
REGISTER_IPC_MESSAGE(Ipc_CqueryTextDocumentDidView);
|
||||||
|
@ -899,32 +899,6 @@ MAKE_REFLECT_STRUCT(lsServerCapabilities,
|
|||||||
documentLinkProvider,
|
documentLinkProvider,
|
||||||
executeCommandProvider);
|
executeCommandProvider);
|
||||||
|
|
||||||
struct Ipc_InitializeRequest : public IpcMessage<Ipc_InitializeRequest> {
|
|
||||||
const static IpcId kIpcId = IpcId::Initialize;
|
|
||||||
|
|
||||||
lsRequestId id;
|
|
||||||
lsInitializeParams params;
|
|
||||||
};
|
|
||||||
MAKE_REFLECT_STRUCT(Ipc_InitializeRequest, id, params);
|
|
||||||
|
|
||||||
struct Out_InitializeResponse : public lsOutMessage<Out_InitializeResponse> {
|
|
||||||
struct InitializeResult {
|
|
||||||
lsServerCapabilities capabilities;
|
|
||||||
};
|
|
||||||
lsRequestId id;
|
|
||||||
InitializeResult result;
|
|
||||||
};
|
|
||||||
MAKE_REFLECT_STRUCT(Out_InitializeResponse::InitializeResult, capabilities);
|
|
||||||
MAKE_REFLECT_STRUCT(Out_InitializeResponse, jsonrpc, id, result);
|
|
||||||
|
|
||||||
struct Ipc_InitializedNotification
|
|
||||||
: public IpcMessage<Ipc_InitializedNotification> {
|
|
||||||
const static IpcId kIpcId = IpcId::Initialized;
|
|
||||||
|
|
||||||
lsRequestId id;
|
|
||||||
};
|
|
||||||
MAKE_REFLECT_STRUCT(Ipc_InitializedNotification, id);
|
|
||||||
|
|
||||||
struct Ipc_Exit : public IpcMessage<Ipc_Exit> {
|
struct Ipc_Exit : public IpcMessage<Ipc_Exit> {
|
||||||
static const IpcId kIpcId = IpcId::Exit;
|
static const IpcId kIpcId = IpcId::Exit;
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,34 @@
|
|||||||
|
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
|
|
||||||
|
struct Ipc_InitializeRequest : public IpcMessage<Ipc_InitializeRequest> {
|
||||||
|
const static IpcId kIpcId = IpcId::Initialize;
|
||||||
|
|
||||||
|
lsRequestId id;
|
||||||
|
lsInitializeParams params;
|
||||||
|
};
|
||||||
|
MAKE_REFLECT_STRUCT(Ipc_InitializeRequest, id, params);
|
||||||
|
REGISTER_IPC_MESSAGE(Ipc_InitializeRequest);
|
||||||
|
|
||||||
|
struct Out_InitializeResponse : public lsOutMessage<Out_InitializeResponse> {
|
||||||
|
struct InitializeResult {
|
||||||
|
lsServerCapabilities capabilities;
|
||||||
|
};
|
||||||
|
lsRequestId id;
|
||||||
|
InitializeResult result;
|
||||||
|
};
|
||||||
|
MAKE_REFLECT_STRUCT(Out_InitializeResponse::InitializeResult, capabilities);
|
||||||
|
MAKE_REFLECT_STRUCT(Out_InitializeResponse, jsonrpc, id, result);
|
||||||
|
|
||||||
|
struct Ipc_InitializedNotification
|
||||||
|
: public IpcMessage<Ipc_InitializedNotification> {
|
||||||
|
const static IpcId kIpcId = IpcId::Initialized;
|
||||||
|
|
||||||
|
lsRequestId id;
|
||||||
|
};
|
||||||
|
MAKE_REFLECT_STRUCT(Ipc_InitializedNotification, id);
|
||||||
|
REGISTER_IPC_MESSAGE(Ipc_InitializedNotification);
|
||||||
|
|
||||||
struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
|
struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
|
||||||
void Run(Ipc_InitializeRequest* request) override {
|
void Run(Ipc_InitializeRequest* request) override {
|
||||||
// Log initialization parameters.
|
// Log initialization parameters.
|
||||||
|
Loading…
Reference in New Issue
Block a user