pub struct Gutter {
pub width: u16,
pub style: Style,
pub line_offset: usize,
pub numbers: GutterNumbers,
pub sign_column_width: u16,
}Expand description
Configuration for the line-number gutter rendered to the left of
the text area. width is the number-column cell count reserved
(including any trailing spacer); the renderer right-aligns the
1-based row number into the leftmost width - 1 cells.
sign_column_width reserves cells to the LEFT of the number column
for sign chars (LSP diagnostics, git diff markers). The sign column
is a dedicated strip separate from the number column: vim/neovim
convention is [ sign | number_padded | spacer | text ]. When
sign_column_width == 0 the layout collapses to
[ number_padded | spacer | text ].
line_offset is added to the displayed line number, so a host
rendering a windowed view of a larger document (e.g. picker preview
of a 7000-line buffer) can show the original line numbers instead
of starting at 1. Only applied in Absolute mode.
Fields§
§width: u16Width of the number column (digits + 1 trailing spacer). Does NOT
include sign_column_width.
style: Style§line_offset: usize§numbers: GutterNumbersWhat kind of numbers to render. Defaults to Absolute.
sign_column_width: u16Width of the dedicated sign column to the left of the number column.
Typically 0 (no signs) or 1 (one sign char per row). Signs are
painted in area.x .. area.x + sign_column_width; numbers are
painted in area.x + sign_column_width .. area.x + sign_column_width + width.
Trait Implementations§
impl Copy for Gutter
Auto Trait Implementations§
impl Freeze for Gutter
impl RefUnwindSafe for Gutter
impl Send for Gutter
impl Sync for Gutter
impl Unpin for Gutter
impl UnsafeUnpin for Gutter
impl UnwindSafe for Gutter
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,
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