From cd2f3c1e453cf4b09e8201ecd7be7bb81082a98a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 31 Dec 2017 15:46:24 -0800 Subject: [PATCH] [formatting] Rename formattingOptions to options LanguageClient-neovim `:call LanguageClient_formatting()` works now --- src/messages/text_document_formatting.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/messages/text_document_formatting.cc b/src/messages/text_document_formatting.cc index 8b114cf3..f196bc7a 100644 --- a/src/messages/text_document_formatting.cc +++ b/src/messages/text_document_formatting.cc @@ -19,11 +19,11 @@ struct lsTextDocumentFormattingParams { lsTextDocumentIdentifier textDocument; // The format options, like tabs or spaces. - lsFormattingOptions formattingOptions; + lsFormattingOptions options; }; MAKE_REFLECT_STRUCT(lsTextDocumentFormattingParams, textDocument, - formattingOptions); + options); struct Ipc_TextDocumentFormatting : public IpcMessage { @@ -57,8 +57,8 @@ struct TextDocumentFormattingHandler WorkingFile* working_file = working_files->GetFileByFilename(file->def->path); - int tab_size = request->params.formattingOptions.tabSize; - bool insert_spaces = request->params.formattingOptions.insertSpaces; + int tab_size = request->params.options.tabSize; + bool insert_spaces = request->params.options.insertSpaces; const auto clang_format = std::unique_ptr(new ClangFormat( working_file->filename, working_file->buffer_content,