mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-23 07:52:06 +00:00
[clangd] Handle initialized
notification (no-op to suppress log message)
This commit is contained in:
parent
ec7e4a9a80
commit
8a2d294ed0
@ -600,6 +600,8 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
|
||||
Reply(std::move(Result));
|
||||
}
|
||||
|
||||
void ClangdLSPServer::onInitialized(const InitializedParams &Params) {}
|
||||
|
||||
void ClangdLSPServer::onShutdown(const ShutdownParams &Params,
|
||||
Callback<std::nullptr_t> Reply) {
|
||||
// Do essentially nothing, just say we're ready to exit.
|
||||
@ -1243,6 +1245,7 @@ ClangdLSPServer::ClangdLSPServer(
|
||||
NegotiatedOffsetEncoding(ForcedOffsetEncoding) {
|
||||
// clang-format off
|
||||
MsgHandler->bind("initialize", &ClangdLSPServer::onInitialize);
|
||||
MsgHandler->bind("initialized", &ClangdLSPServer::onInitialized);
|
||||
MsgHandler->bind("shutdown", &ClangdLSPServer::onShutdown);
|
||||
MsgHandler->bind("sync", &ClangdLSPServer::onSync);
|
||||
MsgHandler->bind("textDocument/rangeFormatting", &ClangdLSPServer::onDocumentRangeFormatting);
|
||||
|
@ -67,6 +67,7 @@ private:
|
||||
// LSP methods. Notifications have signature void(const Params&).
|
||||
// Calls have signature void(const Params&, Callback<Response>).
|
||||
void onInitialize(const InitializeParams &, Callback<llvm::json::Value>);
|
||||
void onInitialized(const InitializedParams &);
|
||||
void onShutdown(const ShutdownParams &, Callback<std::nullptr_t>);
|
||||
void onSync(const NoParams &, Callback<std::nullptr_t>);
|
||||
void onDocumentDidOpen(const DidOpenTextDocumentParams &);
|
||||
|
@ -239,6 +239,7 @@ bool fromJSON(const llvm::json::Value &E, TraceLevel &Out);
|
||||
|
||||
struct NoParams {};
|
||||
inline bool fromJSON(const llvm::json::Value &, NoParams &) { return true; }
|
||||
using InitializedParams = NoParams;
|
||||
using ShutdownParams = NoParams;
|
||||
using ExitParams = NoParams;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user