Some update for server.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Server/Scheduler.h>
|
||||
#include <llvm/ADT/FunctionExtras.h>
|
||||
#include <Feature/CodeCompletion.h>
|
||||
#include "Basic/Basic.h"
|
||||
|
||||
namespace clice::proto {
|
||||
|
||||
@@ -72,29 +70,6 @@ struct InitializedParams {};
|
||||
|
||||
namespace clice {
|
||||
|
||||
struct Server {
|
||||
using Handler = llvm::unique_function<void(json::Value, json::Value)>;
|
||||
Scheduler scheduler;
|
||||
llvm::StringMap<Handler> handlers;
|
||||
int run(int argc, const char** argv);
|
||||
|
||||
static Server instance;
|
||||
|
||||
Server();
|
||||
|
||||
int run(int argc, const char** argv);
|
||||
|
||||
void handleMessage(std::string_view message);
|
||||
|
||||
void notify();
|
||||
|
||||
void response(json::Value id, json::Value result);
|
||||
|
||||
public:
|
||||
// LSP methods, if the return type is void, the method is used for notification.
|
||||
// otherwise, the method is used for request.
|
||||
auto initialize(proto::InitializeParams params) -> proto::InitializeResult;
|
||||
|
||||
void initialized(proto::InitializedParams params);
|
||||
};
|
||||
|
||||
} // namespace clice
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user