-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow VS Mac to access a few options and a helper method (#60333)
- Loading branch information
1 parent
3fb22f1
commit 6d44c5e
Showing
4 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/Features/LanguageServer/Protocol/ExternalAccess/VSMac/AnalyzerHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using Microsoft.CodeAnalysis.Diagnostics; | ||
|
||
namespace Microsoft.CodeAnalysis.LanguageServer.ExternalAccess.VSMac; | ||
|
||
internal static class AnalyzerHelper | ||
{ | ||
public static DiagnosticData CreateAnalyzerLoadFailureDiagnostic(AnalyzerLoadFailureEventArgs e, string fullPath, ProjectId? projectId, string? language) | ||
=> DocumentAnalysisExecutor.CreateAnalyzerLoadFailureDiagnostic(e, fullPath, projectId, language); | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
src/Features/LanguageServer/Protocol/ExternalAccess/VSMac/CompletionOptionsAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using Microsoft.CodeAnalysis.Completion; | ||
using Microsoft.CodeAnalysis.Options; | ||
|
||
namespace Microsoft.CodeAnalysis.LanguageServer.ExternalAccess.VSMac; | ||
|
||
internal static class CompletionOptionsAccessor | ||
{ | ||
public static PerLanguageOption2<bool?> ShowItemsFromUnimportedNamespaces | ||
=> CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces; | ||
|
||
public static PerLanguageOption2<bool> TriggerOnTypingLetters | ||
=> CompletionOptionsStorage.TriggerOnTypingLetters; | ||
|
||
public static PerLanguageOption2<bool?> TriggerOnDeletion | ||
=> CompletionOptionsStorage.TriggerOnDeletion; | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
src/Features/LanguageServer/Protocol/ExternalAccess/VSMac/SolutionCrawlerOptionsAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using Microsoft.CodeAnalysis.Options; | ||
using Microsoft.CodeAnalysis.SolutionCrawler; | ||
|
||
namespace Microsoft.CodeAnalysis.LanguageServer.ExternalAccess.VSMac; | ||
|
||
internal static class SolutionCrawlerOptionsAccessor | ||
{ | ||
public static bool LowMemoryForcedMinimalBackgroundAnalysis | ||
{ | ||
get => SolutionCrawlerOptionsStorage.LowMemoryForcedMinimalBackgroundAnalysis; | ||
set => SolutionCrawlerOptionsStorage.LowMemoryForcedMinimalBackgroundAnalysis = value; | ||
} | ||
|
||
public static PerLanguageOption2<BackgroundAnalysisScope> BackgroundAnalysisScopeOption | ||
=> SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption; | ||
|
||
public static BackgroundAnalysisScope GetBackgroundAnalysisScope(IGlobalOptionService globalOptions, string language) | ||
=> SolutionCrawlerOptionsStorage.GetBackgroundAnalysisScope(globalOptions, language); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters