summaryrefslogtreecommitdiff
path: root/source/slang/slang-language-server-auto-format.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-09-26 12:58:48 -0700
committerGitHub <noreply@github.com>2022-09-26 12:58:48 -0700
commite449446d540b6cc3d5fcd70a8f05886ef2be7547 (patch)
treea8060d5ea497a5289fa5410ab8f489bca3d59e10 /source/slang/slang-language-server-auto-format.h
parentfcc1a0973f91f0daff9c5c2d0a00208ecb7b91c2 (diff)
Support clang-format `file` and `--fallback-style` in slangd. (#2412)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-language-server-auto-format.h')
-rw-r--r--source/slang/slang-language-server-auto-format.h4
1 files changed, 3 insertions, 1 deletions
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;