mirror of
https://github.com/MaskRay/ccls.git
synced 2025-04-15 21:32:13 +00:00
[formatting] Rename formattingOptions to options
LanguageClient-neovim `:call LanguageClient_formatting()` works now
This commit is contained in:
parent
c97bc5dbac
commit
cd2f3c1e45
@ -19,11 +19,11 @@ struct lsTextDocumentFormattingParams {
|
|||||||
lsTextDocumentIdentifier textDocument;
|
lsTextDocumentIdentifier textDocument;
|
||||||
|
|
||||||
// The format options, like tabs or spaces.
|
// The format options, like tabs or spaces.
|
||||||
lsFormattingOptions formattingOptions;
|
lsFormattingOptions options;
|
||||||
};
|
};
|
||||||
MAKE_REFLECT_STRUCT(lsTextDocumentFormattingParams,
|
MAKE_REFLECT_STRUCT(lsTextDocumentFormattingParams,
|
||||||
textDocument,
|
textDocument,
|
||||||
formattingOptions);
|
options);
|
||||||
|
|
||||||
struct Ipc_TextDocumentFormatting
|
struct Ipc_TextDocumentFormatting
|
||||||
: public IpcMessage<Ipc_TextDocumentFormatting> {
|
: public IpcMessage<Ipc_TextDocumentFormatting> {
|
||||||
@ -57,8 +57,8 @@ struct TextDocumentFormattingHandler
|
|||||||
WorkingFile* working_file =
|
WorkingFile* working_file =
|
||||||
working_files->GetFileByFilename(file->def->path);
|
working_files->GetFileByFilename(file->def->path);
|
||||||
|
|
||||||
int tab_size = request->params.formattingOptions.tabSize;
|
int tab_size = request->params.options.tabSize;
|
||||||
bool insert_spaces = request->params.formattingOptions.insertSpaces;
|
bool insert_spaces = request->params.options.insertSpaces;
|
||||||
|
|
||||||
const auto clang_format = std::unique_ptr<ClangFormat>(new ClangFormat(
|
const auto clang_format = std::unique_ptr<ClangFormat>(new ClangFormat(
|
||||||
working_file->filename, working_file->buffer_content,
|
working_file->filename, working_file->buffer_content,
|
||||||
|
Loading…
Reference in New Issue
Block a user