Move formatting structs to text_document_formatting.cc

This commit is contained in:
Daniel Martín 2017-12-27 19:38:50 +01:00
parent aa4e5e7e5b
commit 0e16899b81
2 changed files with 19 additions and 19 deletions

View File

@ -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.

View File

@ -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<Ipc_TextDocumentFormatting> {
const static IpcId kIpcId = IpcId::TextDocumentFormatting;