#pragma once #include #include namespace clice { struct Server { using Handler = llvm::unique_function; Scheduler scheduler; llvm::StringMap handlers; 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