idea-plugin / arrow.meta.ide.dsl.editor.color / ColorSettingsSyntax

ColorSettingsSyntax

interface ColorSettingsSyntax

ColorSettingsPage goes hand in hand with SyntaxHighlighter’s. ColorSettingsPage add’s a custom page in the user Settings under “Color Scheme” and is based on a custom SyntaxHighlighter composed with SyntaxHighlighterSyntax.syntaxHighlighter. Consequently, ColorSettingsPages not only allow users to customize the colors of SyntaxHighlighter’s for a better ide experience, More importantly, they provide means, to highlight additional descriptors from the Parser or Annotator. One use-case for ColorSettingsPages, among others, is to use them as a visual template in the ide, before the actual SyntaxHighlighter is created. Therefore, a ColorSettingsPage visually enhances the underlying SyntaxHighlighter and all descriptors from the Parser and Annotator. Additionally, there are other use-cases with Themes.

See Also

SyntaxHighlighterSyntax

Properties

descriptor convenience extension to create AttributesDescriptor using TextAttributesKey.getExternalName as it’s displayNameopen val TextAttributesKey.descriptor: AttributesDescriptor

Functions

addColorSettingsPage This extension registers a ColorSettingsPage. Let’s register MetaColorSettings with the KotlinHighlighter and an empty additionalHighlightingTags.open fun IdeMetaPlugin.addColorSettingsPage(displayName: String, priority: DisplayPriority, additionalHighlightingTags: MutableMap<String, TextAttributesKey>, attributesDescriptor: Array<AttributesDescriptor> = additionalHighlightingTags.map { (k, v) -> k toA v }.toTypedArray(), demoText: String = FontEditorPreview.getIDEDemoText(), highlighter: SyntaxHighlighter = PlainSyntaxHighlighter(), icon: Icon? = null, colorDescriptor: Array<ColorDescriptor> = ColorDescriptor.EMPTY_ARRAY, isRainbowType: (type: TextAttributesKey) -> Boolean = Noop.boolean1False, language: Language? = null, customize: EditorEx.() -> Unit = Noop.effect1): ExtensionPhase
colorSettingsPage open fun ColorSettingsSyntax.colorSettingsPage(displayName: String, priority: DisplayPriority, additionalHighlightingTags: MutableMap<String, TextAttributesKey>, attributesDescriptor: Array<AttributesDescriptor> = additionalHighlightingTags.map { (k, v) -> k toA v }.toTypedArray(), demoText: String = FontEditorPreview.getIDEDemoText(), highlighter: SyntaxHighlighter = PlainSyntaxHighlighter(), icon: Icon? = null, colorDescriptor: Array<ColorDescriptor> = ColorDescriptor.EMPTY_ARRAY, isRainbowType: (type: TextAttributesKey) -> Boolean = Noop.boolean1False, language: Language? = null, customize: EditorEx.() -> Unit = Noop.effect1): ColorSettingsPage
toA convenience function to create AttributesDescriptoropen infix fun String.toA(key: TextAttributesKey): AttributesDescriptor

Inheritors

IdeSyntax interface IdeSyntax : IconProviderSyntax, SyntaxHighlighterSyntax, InspectionSyntax, AnActionSyntax, ColorSettingsSyntax, HintingSyntax, LanguageSyntax, LineMarkerSyntax, LiveTemplateSyntax, NavigationSyntax, SearchSyntax, StructureViewSyntax, UsageSyntax, ExtensionProviderSyntax, DocumentationSyntax, KotlinExtensionSyntax, DialogSyntax, PopupSyntax, NotificationSyntax, ToolWindowSyntax, GotoRelatedSyntax, AnnotatorSyntax, ParserSyntax, ApplicationSyntax

Do you like Arrow?

Arrow Org
<