pub struct PreviewConfig {
pub syntax_highlighting: bool,
pub syntax_highlighting_theme: Theme,
pub wrap_text: bool,
}Fields§
§syntax_highlighting: boolWhether to apply syntax highlighting to the preview. Defaults to true.
syntax_highlighting_theme: ThemeThe theme to use when syntax highlighting is enabled.
The default is "base16-eighties.dark". Other built-in options are
"base16-mocha.dark", "base16-ocean.dark", "base16-ocean.light", "InspiredGitHub", "Solarized (dark)" and "Solarized (light)".
You can use other themes by adding .tmTheme files to <scooter-config-dir>/themes and then specifying their name here.
By default, <scooter-config-dir> is ~/.config/scooter/ on Linux or macOS, or %AppData%\scooter\ on Windows, and can be overridden with the --config-dir flag.
For instance, to use Catppuccin Macchiato (from here), on Linux or macOS run:
wget -P ~/.config/scooter/themes https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmThemeand then set syntax_highlighting_theme = "Catppuccin Macchiato".
wrap_text: boolWrap text onto the next line if it is wider than the preview window. Defaults to false. (Can be toggled in the UI using ctrl+l.)
Trait Implementations§
Source§impl Clone for PreviewConfig
impl Clone for PreviewConfig
Source§fn clone(&self) -> PreviewConfig
fn clone(&self) -> PreviewConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreviewConfig
impl Debug for PreviewConfig
Source§impl Default for PreviewConfig
impl Default for PreviewConfig
Source§impl<'de> Deserialize<'de> for PreviewConfigwhere
PreviewConfig: Default,
impl<'de> Deserialize<'de> for PreviewConfigwhere
PreviewConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PreviewConfig
impl PartialEq for PreviewConfig
impl StructuralPartialEq for PreviewConfig
Auto Trait Implementations§
impl Freeze for PreviewConfig
impl RefUnwindSafe for PreviewConfig
impl Send for PreviewConfig
impl Sync for PreviewConfig
impl Unpin for PreviewConfig
impl UnsafeUnpin for PreviewConfig
impl UnwindSafe for PreviewConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more