/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/LanguageServer/Protocol/Features/Options/HighlightingOptionsStorage.cs
29 строк
1 KB
Tomáš Matoušek
Move LanguageServer out of Features directory (#73779)
30 май 2024, 18:49
Не верифицирован
30 май 2024, 18:49
12f8968
Код
Авторство
О чём код?
// 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; namespace Microsoft.CodeAnalysis.DocumentHighlighting; internal static class HighlightingOptionsStorage { public static HighlightingOptions GetHighlightingOptions(this IGlobalOptionService globalOptions, string language) => new() { HighlightRelatedRegexComponentsUnderCursor = globalOptions.GetOption(HighlightRelatedRegexComponentsUnderCursor, language), HighlightRelatedJsonComponentsUnderCursor = globalOptions.GetOption(HighlightRelatedJsonComponentsUnderCursor, language) }; private static readonly OptionGroup s_highlightingGroup = new(name: "highlighting", description: ""); public static PerLanguageOption2<bool> HighlightRelatedRegexComponentsUnderCursor = new("dotnet_highlight_related_regex_components", defaultValue: true, s_highlightingGroup); public static PerLanguageOption2<bool> HighlightRelatedJsonComponentsUnderCursor = new("dotnet_highlight_related_json_components", defaultValue: HighlightingOptions.Default.HighlightRelatedJsonComponentsUnderCursor, s_highlightingGroup); }