mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 23:55:08 +00:00
Move formatting structs to text_document_formatting.cc
This commit is contained in:
parent
aa4e5e7e5b
commit
0e16899b81
@ -273,25 +273,6 @@ struct lsTextDocumentPositionParams {
|
|||||||
};
|
};
|
||||||
MAKE_REFLECT_STRUCT(lsTextDocumentPositionParams, textDocument, position);
|
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 {
|
struct lsTextEdit {
|
||||||
// The range of the text document to be manipulated. To insert
|
// The range of the text document to be manipulated. To insert
|
||||||
// text into a document create a range where start === end.
|
// text into a document create a range where start === end.
|
||||||
|
@ -2,6 +2,25 @@
|
|||||||
#include "message_handler.h"
|
#include "message_handler.h"
|
||||||
|
|
||||||
namespace {
|
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
|
struct Ipc_TextDocumentFormatting
|
||||||
: public IpcMessage<Ipc_TextDocumentFormatting> {
|
: public IpcMessage<Ipc_TextDocumentFormatting> {
|
||||||
const static IpcId kIpcId = IpcId::TextDocumentFormatting;
|
const static IpcId kIpcId = IpcId::TextDocumentFormatting;
|
||||||
|
Loading…
Reference in New Issue
Block a user