Skip to content

KaTextAttribute

interface KaTextAttribute

Describes the semantic role of a fragment of rendered text, e.g. for syntax highlighting.

Inheritors

Types

Comment

A comment, such as /* = kotlin.String */.

Identifier

An identifier, such as a declaration or type name. See Symbol when the referenced symbol is known.

Keyword

A hard keyword or soft/modifier keyword, such as fun, val, or suspend.

NumberLiteral

A numeric literal, such as 42, 2f, or 3u.

Punctuation

Punctuation, such as :, ,, or ?.

StringLiteral

A string or character literal, such as "text" or 'c'.

Symbol

An identifier that references a known symbol. Only attached when KaRenderingOption.LinkSymbols is enabled.

Whitespace

Whitespace that is not a line break.