pub struct EditorLine {Show 21 fields
pub raw_text: String,
pub gutter_text: String,
pub spans: Vec<EditorStyledSpan>,
pub line_idx: usize,
pub is_current_line: bool,
pub is_fold_header: bool,
pub folded_line_count: usize,
pub git_diff: Option<GitLineStatus>,
pub diff_status: Option<DiffLine>,
pub diagnostics: Vec<DiagnosticMark>,
pub spell_errors: Vec<SpellMark>,
pub is_breakpoint: bool,
pub is_conditional_bp: bool,
pub is_dap_current: bool,
pub is_wrap_continuation: bool,
pub segment_col_offset: usize,
pub annotation: Option<String>,
pub ghost_suffix: Option<String>,
pub is_ghost_continuation: bool,
pub indent_guides: Vec<usize>,
pub colorcolumns: Vec<usize>,
}Expand description
One visible line in an Editor viewport, ready for the rasteriser.
Field shapes mirror vimcode::render::RenderedLine field-for-field
(verbatim port). The vimcode-side adapter at the rasteriser
boundary builds an EditorLine from a RenderedLine per frame.
Fields§
§raw_text: StringRaw UTF-8 text (may include a trailing \n).
gutter_text: StringPre-formatted gutter text (e.g. " 42" / " 3").
Empty when line numbers are disabled.
spans: Vec<EditorStyledSpan>Syntax-highlight + search-match spans (byte-offset based, into
raw_text).
line_idx: usizeBuffer line index this rendered row corresponds to. Used by click handlers to map screen row → buffer line.
is_current_line: boolTrue when the cursor is on this line (drives gutter highlight).
is_fold_header: boolTrue when this is the header of a closed fold.
folded_line_count: usizeNumber of lines hidden in the fold (0 unless is_fold_header).
git_diff: Option<GitLineStatus>Git diff status (Added / Modified / Deleted). None when
the buffer is not git-tracked or the line is unchanged.
diff_status: Option<DiffLine>Two-way diff status. None when diff mode is off.
diagnostics: Vec<DiagnosticMark>LSP diagnostic spans on this line (may be empty).
spell_errors: Vec<SpellMark>Spell-check error spans on this line (may be empty).
is_breakpoint: boolTrue when there is a DAP breakpoint set on this line.
is_conditional_bp: boolTrue when the breakpoint has a condition / hit count / log message (rasteriser draws ◆ instead of ●).
is_dap_current: boolTrue when the DAP adapter is currently stopped at this line.
is_wrap_continuation: boolTrue when this row is a wrap-continuation (the 2nd+ visual row
of a long buffer line). The line number belongs to the
preceding non-continuation row; gutter_text is blank.
segment_col_offset: usizeCharacter offset within the buffer line where this visual segment begins. 0 for non-wrapped lines and the first visual segment of a wrapped line.
annotation: Option<String>Inline annotation (virtual text — git blame, plugin output,
etc.) shown after line content in annotation_fg.
ghost_suffix: Option<String>AI ghost text shown after the cursor on this line (Insert
mode). Rendered in ghost_text_fg.
is_ghost_continuation: boolTrue for virtual rows showing AI completion continuation lines.
raw_text is empty; the full text is in ghost_suffix and
rasterisers paint it from the left edge of the content area.
indent_guides: Vec<usize>Column positions where indent-guide rules should be drawn.
Empty when the indent_guides setting is off.
colorcolumns: Vec<usize>Column positions where the colorcolumn background should be painted.
Trait Implementations§
Source§impl Clone for EditorLine
impl Clone for EditorLine
Source§impl Debug for EditorLine
impl Debug for EditorLine
Source§impl<'de> Deserialize<'de> for EditorLine
impl<'de> Deserialize<'de> for EditorLine
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 EditorLine
impl PartialEq for EditorLine
Source§impl Serialize for EditorLine
impl Serialize for EditorLine
impl StructuralPartialEq for EditorLine
Auto Trait Implementations§
impl Freeze for EditorLine
impl RefUnwindSafe for EditorLine
impl Send for EditorLine
impl Sync for EditorLine
impl Unpin for EditorLine
impl UnsafeUnpin for EditorLine
impl UnwindSafe for EditorLine
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for 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