ccls/src/messages/text_document_did_change.cc

14 lines
497 B
C++
Raw Normal View History

2017-12-06 03:32:33 +00:00
#include "message_handler.h"
struct TextDocumentDidChangeHandler
: BaseMessageHandler<Ipc_TextDocumentDidChange> {
void Run(Ipc_TextDocumentDidChange* request) override {
std::string path = request->params.textDocument.uri.GetPath();
working_files->OnChange(request->params);
clang_complete->NotifyEdit(path);
clang_complete->DiagnosticsUpdate(
request->params.textDocument.AsTextDocumentIdentifier());
}
};
REGISTER_MESSAGE_HANDLER(TextDocumentDidChangeHandler);