pub struct EditorCustomStyle(/* private fields */);Expand description
The custom style elements that are specific to an Editor.
Implementations§
Source§impl EditorCustomStyle
impl EditorCustomStyle
Sourcepub fn hide_gutter(self, hide: bool) -> Self
pub fn hide_gutter(self, hide: bool) -> Self
Sets whether the gutter should be hidden.
Sourcepub fn gutter_accent_color(self, color: Color) -> Self
pub fn gutter_accent_color(self, color: Color) -> Self
Sets the text accent color of the gutter.
This is the color of the line number for the current line. It will default to the current Text Color
Sourcepub fn gutter_dim_color(self, color: Color) -> Self
pub fn gutter_dim_color(self, color: Color) -> Self
Sets the text dim color of the gutter.
This is the color of the line number for all lines except the current line. If this is not specified it will default to the gutter accent color.
Sourcepub fn gutter_left_padding(self, padding: f64) -> Self
pub fn gutter_left_padding(self, padding: f64) -> Self
Sets the padding to the left of the numbers in the gutter.
Sourcepub fn gutter_right_padding(self, padding: f64) -> Self
pub fn gutter_right_padding(self, padding: f64) -> Self
Sets the padding to the right of the numbers in the gutter.
Sourcepub fn gutter_current_color(self, color: Color) -> Self
pub fn gutter_current_color(self, color: Color) -> Self
Sets the background color of the current line in the gutter
Sourcepub fn selection_color(self, color: Color) -> Self
pub fn selection_color(self, color: Color) -> Self
Sets the background color to be applied around selected text.
Sourcepub fn indent_style(self, indent_style: IndentStyle) -> Self
pub fn indent_style(self, indent_style: IndentStyle) -> Self
Sets the indent style.
Sourcepub fn indent_guide_color(self, color: Color) -> Self
pub fn indent_guide_color(self, color: Color) -> Self
Sets the color of the indent guide.
Sourcepub fn wrap_method(self, wrap: WrapMethod) -> Self
pub fn wrap_method(self, wrap: WrapMethod) -> Self
Sets the method for wrapping lines.
Sourcepub fn cursor_color(self, cursor: Color) -> Self
pub fn cursor_color(self, cursor: Color) -> Self
Sets the color of the cursor.
Sourcepub fn scroll_beyond_last_line(self, scroll_beyond: bool) -> Self
pub fn scroll_beyond_last_line(self, scroll_beyond: bool) -> Self
Allow scrolling beyond the last line of the document.
Sourcepub fn current_line_color(self, color: Color) -> Self
pub fn current_line_color(self, color: Color) -> Self
Sets the background color of the current line.
Sourcepub fn visible_whitespace(self, color: Color) -> Self
pub fn visible_whitespace(self, color: Color) -> Self
Sets the color of visible whitespace characters.
Sourcepub fn render_white_space(self, render_white_space: RenderWhitespace) -> Self
pub fn render_white_space(self, render_white_space: RenderWhitespace) -> Self
Sets which white space characters should be rendered.
Sourcepub fn cursor_surrounding_lines(self, lines: usize) -> Self
pub fn cursor_surrounding_lines(self, lines: usize) -> Self
Set the number of lines to keep visible above and below the cursor.
Default: 1
Sourcepub fn indent_guide(self, show: bool) -> Self
pub fn indent_guide(self, show: bool) -> Self
Sets whether the indent guides should be displayed.
Sourcepub fn modal_relative_line(self, modal_relative_line: bool) -> Self
pub fn modal_relative_line(self, modal_relative_line: bool) -> Self
Determines if line numbers are relative in modal mode.
Sourcepub fn smart_tab(self, smart_tab: bool) -> Self
pub fn smart_tab(self, smart_tab: bool) -> Self
Enables or disables smart tab behavior, which inserts the indent style detected in the file when the tab key is pressed.
Sourcepub fn phantom_color(self, color: Color) -> Self
pub fn phantom_color(self, color: Color) -> Self
Sets the color of phantom text
Sourcepub fn placeholder_color(self, color: Color) -> Self
pub fn placeholder_color(self, color: Color) -> Self
Sets the color of the placeholder text.
Sourcepub fn preedit_underline_color(self, color: Color) -> Self
pub fn preedit_underline_color(self, color: Color) -> Self
Sets the color of the underline for preedit text.
Auto Trait Implementations§
impl Freeze for EditorCustomStyle
impl !RefUnwindSafe for EditorCustomStyle
impl !Send for EditorCustomStyle
impl !Sync for EditorCustomStyle
impl Unpin for EditorCustomStyle
impl !UnwindSafe for EditorCustomStyle
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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