Set typeDefinitionProvider

This commit is contained in:
Fangrui Song 2018-04-05 00:15:21 -07:00
parent 96bba583c9
commit 2035a24c74
3 changed files with 3 additions and 21 deletions

View File

@ -138,8 +138,7 @@ bool QueryDbMainLoop(QueryDatabase* db,
}
if (message) {
LOG_S(FATAL) << "Exiting; no handler for " << message->GetMethodType();
exit(1);
LOG_S(ERROR) << "No handler for " << message->GetMethodType();
}
}

View File

@ -175,6 +175,7 @@ MAKE_REFLECT_STRUCT(lsServerCapabilities,
completionProvider,
signatureHelpProvider,
definitionProvider,
typeDefinitionProvider,
referencesProvider,
documentHighlightProvider,
documentSymbolProvider,
@ -484,20 +485,6 @@ struct Handler_Initialize : BaseMessageHandler<In_InitializeRequest> {
Out_InitializeResponse out;
out.id = request->id;
// out.result.capabilities.textDocumentSync =
// lsTextDocumentSyncOptions();
// out.result.capabilities.textDocumentSync->openClose = true;
// out.result.capabilities.textDocumentSync->change =
// lsTextDocumentSyncKind::Full;
// out.result.capabilities.textDocumentSync->willSave = true;
// out.result.capabilities.textDocumentSync->willSaveWaitUntil =
// true;
#if USE_CLANG_CXX
out.result.capabilities.documentFormattingProvider = true;
out.result.capabilities.documentRangeFormattingProvider = true;
#endif
QueueManager::WriteStdout(kMethodType, out);
// Set project root.

View File

@ -2,18 +2,14 @@
#include "utils.h"
#include <optional>
#include <algorithm>
#include <atomic>
#include <condition_variable>
#include <deque>
#include <mutex>
#include <optional>
#include <tuple>
#include <utility>
// TODO: cleanup includes.
struct BaseThreadQueue {
virtual bool IsEmpty() = 0;
virtual ~BaseThreadQueue() = default;