ArrayRef<tooling::Range> Ranges) {
// Call clang-format.
auto FS = FSProvider.getFileSystem();
- auto Style = format::getStyle("file", File, "LLVM", Code, FS.get());
+ auto Style = format::getStyle(format::DefaultFormatStyle, File,
+ format::DefaultFallbackStyle, Code, FS.get());
if (!Style)
return Style.takeError();
// Initialize Includes if provided.
// FIXME(ioeric): needs more consistent style support in clangd server.
- auto Style = format::getStyle("file", Input.FileName, "LLVM",
- Input.Contents, Input.VFS.get());
+ auto Style = format::getStyle(format::DefaultFormatStyle, Input.FileName,
+ format::DefaultFallbackStyle, Input.Contents,
+ Input.VFS.get());
if (!Style) {
- log("Failed to get FormatStyle for file" + Input.FileName +
+ log("ERROR: failed to get FormatStyle for file " + Input.FileName +
". Fall back to use LLVM style. Error: " +
llvm::toString(Style.takeError()));
Style = format::getLLVMStyle();