Allow force disabling snippet via client.snippetSupport

This commit is contained in:
Riatre Foo 2018-09-14 05:01:37 +08:00 committed by Fangrui Song
parent dfdabe41b2
commit 174466516e
2 changed files with 4 additions and 4 deletions

View File

@ -70,9 +70,9 @@ struct Config {
struct ClientCapability {
// TextDocumentClientCapabilities.documentSymbol.hierarchicalDocumentSymbolSupport
bool hierarchicalDocumentSymbolSupport = false;
bool hierarchicalDocumentSymbolSupport = true;
// TextDocumentClientCapabilities.completion.completionItem.snippetSupport
bool snippetSupport = false;
bool snippetSupport = true;
} client;
struct CodeLens {

View File

@ -441,9 +441,9 @@ struct Handler_Initialize : BaseMessageHandler<In_InitializeRequest> {
// Client capabilities
const auto &capabilities = params.capabilities;
g_config->client.snippetSupport =
g_config->client.snippetSupport &=
capabilities.textDocument.completion.completionItem.snippetSupport;
g_config->client.hierarchicalDocumentSymbolSupport =
g_config->client.hierarchicalDocumentSymbolSupport &=
capabilities.textDocument.documentSymbol.hierarchicalDocumentSymbolSupport;
// Ensure there is a resource directory.