pub struct Config<'a> {Show 16 fields
pub language: Option<&'a str>,
pub show_nonprintable: bool,
pub term_width: usize,
pub tab_width: usize,
pub loop_through: bool,
pub colored_output: bool,
pub true_color: bool,
pub style_components: StyleComponents,
pub wrapping_mode: WrappingMode,
pub visible_lines: VisibleLines,
pub theme: String,
pub syntax_mapping: SyntaxMapping<'a>,
pub pager: Option<&'a str>,
pub use_italic_text: bool,
pub highlighted_lines: HighlightedLineRanges,
pub use_custom_assets: bool,
}
Fields§
§language: Option<&'a str>
The explicitly configured language, if any
show_nonprintable: bool
Whether or not to show/replace non-printable characters like space, tab and newline.
term_width: usize
The character width of the terminal
tab_width: usize
The width of tab characters. Currently, a value of 0 will cause tabs to be passed through without expanding them.
loop_through: bool
Whether or not to simply loop through all input (cat
mode)
colored_output: bool
Whether or not the output should be colorized
true_color: bool
Whether or not the output terminal supports true color
style_components: StyleComponents
Style elements (grid, line numbers, …)
wrapping_mode: WrappingMode
If and how text should be wrapped
visible_lines: VisibleLines
Specifies which lines should be printed
theme: String
The syntax highlighting theme
syntax_mapping: SyntaxMapping<'a>
File extension/name mappings
pager: Option<&'a str>
Command to start the pager
use_italic_text: bool
Whether or not to use ANSI italics
highlighted_lines: HighlightedLineRanges
Ranges of lines which should be highlighted with a special background color
use_custom_assets: bool
Whether or not to allow custom assets. If this is false or if custom assets (a.k.a. cached assets) are not available, assets from the binary will be used instead.