#[non_exhaustive]pub enum Kind {
Show 20 variants
Plain,
Keyword,
Type,
Function,
String,
Comment,
Number,
Constant,
Punctuation,
Operator,
Attribute,
Property,
Variable,
Tag,
Heading,
Emphasis,
Link,
Inserted,
Deleted,
Meta,
}Expand description
What a span of source text is, for colouring.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Plain
Anything without a colour of its own: identifiers, whitespace, text.
Keyword
Language keywords (fn, if, return, SELECT).
Type
Type names (u32, String, a class name, a TOML table header).
Function
Function and macro names at a call or a definition.
String
String and character literals, heredocs, YAML plain values, inline code.
Comment
Comments.
Number
Numeric literals (and CSS colours and dimensions).
Constant
Named constants: true, null, None, ALL_CAPS names, HTML entities.
Punctuation
Brackets, separators and similar.
Operator
Operators (+, &&, =, |).
Attribute
Attributes, annotations, decorators, preprocessor lines, HTML attribute names.
Property
Keys and properties: JSON/TOML/YAML keys, CSS properties.
Variable
Variables with a sigil or a role: $HOME, lifetimes, YAML anchors, SQL parameters.
Tag
Markup tag names (div, a CSS element selector).
Heading
Markdown headings.
Emphasis
Markdown emphasis and strong emphasis.
Link
Markdown links and autolinks.
Inserted
Added lines in a diff.
Deleted
Removed lines in a diff.
Meta
Meta lines: diff headers and hunk markers, front matter fences, doctype.