From e449446d540b6cc3d5fcd70a8f05886ef2be7547 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 26 Sep 2022 12:58:48 -0700 Subject: Support clang-format `file` and `--fallback-style` in slangd. (#2412) Co-authored-by: Yong He --- source/slang/slang-language-server-auto-format.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-language-server-auto-format.h') diff --git a/source/slang/slang-language-server-auto-format.h b/source/slang/slang-language-server-auto-format.h index b30a2f039..a2668dbe1 100644 --- a/source/slang/slang-language-server-auto-format.h +++ b/source/slang/slang-language-server-auto-format.h @@ -22,7 +22,9 @@ enum class FormatBehavior struct FormatOptions { String clangFormatLocation; - String style = "{BasedOnStyle: Microsoft}"; + String style = "file"; + String fallbackStyle = "{BasedOnStyle: Microsoft}"; + String fileName; bool allowLineBreakInOnTypeFormatting = false; bool allowLineBreakInRangeFormatting = false; FormatBehavior behavior = FormatBehavior::Standard; -- cgit v1.2.3