-
Notifications
You must be signed in to change notification settings - Fork 810
/
Copy pathFSharpExtensionSettings.cs
55 lines (47 loc) · 1.83 KB
/
FSharpExtensionSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using Microsoft.VisualStudio.Extensibility;
using Microsoft.VisualStudio.Extensibility.Settings;
namespace FSharp.VisualStudio.Extension
{
#pragma warning disable VSEXTPREVIEW_SETTINGS // The settings API is currently in preview and marked as experimental
internal static class FSharpExtensionSettings
{
public const string OLD = "old";
public const string LSP = "lsp";
public const string BOTH = "both";
public const string UNSET = "unset";
public static EnumSettingEntry[] ExtensionChoice { get; } =
[
new(OLD, "%FSharpSettings.Old%"),
new(LSP, "%FSharpSettings.LSP%"),
new(BOTH, "%FSharpSettings.Both%"),
new(UNSET, "%FSharpSettings.Unset%"),
];
[VisualStudioContribution]
public static SettingCategory FSharpCategory { get; } = new("fsharp", "%F#%");
[VisualStudioContribution]
public static Setting.Enum GetDiagnosticsFrom { get; } = new(
"getDiagnosticsFrom",
"%FSharpSettings.GetDiagnosticsFrom%",
FSharpCategory,
ExtensionChoice,
defaultValue: UNSET)
{
Description = "%Which extension should be used to provide diagnostics%",
};
[VisualStudioContribution]
public static Setting.Enum GetSemanticHighlightingFrom { get; } = new(
"getSemanticHighlightingFrom",
"%FSharpSettings.GetSemanticHighlightingFrom%",
FSharpCategory,
ExtensionChoice,
defaultValue: UNSET)
{
Description = "%Which extension should be used to provide semantic highlighting%",
};
public static Setting<string>[] AllStringSettings { get; } =
[
GetDiagnosticsFrom,
GetSemanticHighlightingFrom,
];
}
}