From 0e16899b81c1561005485c33d721e4587eeb8e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Wed, 27 Dec 2017 19:38:50 +0100 Subject: [PATCH] Move formatting structs to text_document_formatting.cc --- src/language_server_api.h | 19 ------------------- src/messages/text_document_formatting.cc | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/language_server_api.h b/src/language_server_api.h index c600e74f..cd139ede 100644 --- a/src/language_server_api.h +++ b/src/language_server_api.h @@ -273,25 +273,6 @@ struct lsTextDocumentPositionParams { }; MAKE_REFLECT_STRUCT(lsTextDocumentPositionParams, textDocument, position); -struct lsFormattingOptions { - // Size of a tab in spaces. - int tabSize; - // Prefer spaces over tabs. - bool insertSpaces; -}; -MAKE_REFLECT_STRUCT(lsFormattingOptions, tabSize, insertSpaces); - -struct lsTextDocumentFormattingParams { - // The text document. - lsTextDocumentIdentifier textDocument; - - // The format options, like tabs or spaces. - lsFormattingOptions formattingOptions; -}; -MAKE_REFLECT_STRUCT(lsTextDocumentFormattingParams, - textDocument, - formattingOptions); - struct lsTextEdit { // The range of the text document to be manipulated. To insert // text into a document create a range where start === end. diff --git a/src/messages/text_document_formatting.cc b/src/messages/text_document_formatting.cc index e5eaac1e..d6846983 100644 --- a/src/messages/text_document_formatting.cc +++ b/src/messages/text_document_formatting.cc @@ -2,6 +2,25 @@ #include "message_handler.h" namespace { +struct lsFormattingOptions { + // Size of a tab in spaces. + int tabSize; + // Prefer spaces over tabs. + bool insertSpaces; +}; +MAKE_REFLECT_STRUCT(lsFormattingOptions, tabSize, insertSpaces); + +struct lsTextDocumentFormattingParams { + // The text document. + lsTextDocumentIdentifier textDocument; + + // The format options, like tabs or spaces. + lsFormattingOptions formattingOptions; +}; +MAKE_REFLECT_STRUCT(lsTextDocumentFormattingParams, + textDocument, + formattingOptions); + struct Ipc_TextDocumentFormatting : public IpcMessage { const static IpcId kIpcId = IpcId::TextDocumentFormatting;