Struct SetExtmarkOptsBuilder

Source
pub struct SetExtmarkOptsBuilder(/* private fields */);

Implementations§

Source§

impl SetExtmarkOptsBuilder

Source

pub fn conceal(&mut self, ch: Option<char>) -> &mut Self

Enable concealing symilar to :syn-conceal. If a character is supplied it is used as :syn-cchar.

hl_group is used to highlight the character if provided, otherwise it defaults to hl-Conceal.

Source

pub fn cursorline_hl_group(&mut self, cursorline_hl_group: &str) -> &mut Self

Name of the highlight group used to highlight the line when the cursor is on the same line as the mark and cursorline is enabled.

Source

pub fn end_col(&mut self, end_col: usize) -> &mut Self

Ending line of the mark. 0-indexed and exclusive.

Source

pub fn end_right_gravity(&mut self, end_right_gravity: bool) -> &mut Self

Indicates the direction the extmark’s end position (if it exists) will be shifted in when new text is inserted (true for right, false for left). Defaults to left.

Source

pub fn end_row(&mut self, end_row: usize) -> &mut Self

Ending line of the mark. 0-indexed and inclusive.

Source

pub fn ephemeral(&mut self, ephemeral: bool) -> &mut Self

For use with api::set_decoration_provider callbacks. The mark will only be used for the current redraw cycle, and not be permanently stored in the buffer.

Source

pub fn hl_eol(&mut self, hl_eol: bool) -> &mut Self

Whether to continue the highlight for the rest of the screen line for multiline highlights covering the EOL of a line.

Source

pub fn hl_group(&mut self, hl_group: &str) -> &mut Self

Name of the highlight group used to highlight this mark.

Source

pub fn hl_mode(&mut self, hl_mode: ExtmarkHlMode) -> &mut Self

Controls how highlights are combined with the highlights of the text.

Source

pub fn id(&mut self, id: u32) -> &mut Self

Id of the extmark to edit.

Source

pub fn line_hl_group(&mut self, line_hl_group: &str) -> &mut Self

Name of the highlight group used to highlight the whole line.

Source

pub fn number_hl_group(&mut self, number_hl_group: &str) -> &mut Self

Name of the highlight group used to highlight the number column.

Source

pub fn priority(&mut self, priority: u32) -> &mut Self

A priority value for the highlight group. For example, treesitter highlights use a value of 100.

Source

pub fn right_gravity(&mut self, right_gravity: u32) -> &mut Self

Indicates the direction the extmark will be shifted in when new text is inserted (true for right, false for left). Defaults to right.

Source

pub fn sign_hl_group(&mut self, sign_hl_group: &str) -> &mut Self

Name of the highlight group used to highlight the sign column text.

Source

pub fn sign_text(&mut self, sign_text: &str) -> &mut Self

Text to display in the sign column. Should take up 1-2 display cells.

Source

pub fn strict(&mut self, strict: bool) -> &mut Self

Whether the extmark should not be placed if the line or column value is past the end of the buffer or end of the line, respectively. Defaults to true.

Source

pub fn virt_lines<Txt, Hl, Cnk, ChunkyCnk>( &mut self, virt_lines: ChunkyCnk, ) -> &mut Self
where ChunkyCnk: IntoIterator<Item = Cnk>, Cnk: IntoIterator<Item = (Txt, Hl)>, Txt: Into<String>, Hl: StringOrListOfStrings,

Virtual lines to add next to the mark.

Source

pub fn virt_lines_above(&mut self, virt_lines_above: bool) -> &mut Self

Whether to place virtual lines above the buffer line containing the mark.

Source

pub fn virt_lines_leftcol(&mut self, virt_lines_leftcol: bool) -> &mut Self

Whether to place extmarks in the leftmost column of the ewindow, bypassing sign and number columns.

Source

pub fn virt_text<Txt, Hl, Cnk>(&mut self, virt_text: Cnk) -> &mut Self
where Cnk: IntoIterator<Item = (Txt, Hl)>, Txt: Into<String>, Hl: StringOrListOfStrings,

Virtual text to link to this mark. Every (text, highlights) tuple represents a text chunk with a specified highlight. The highlights specified in highlights will be combined together, with the highest priority highlight beign applied last. Each highlight group can either be a string or an integer, the latter obtained using api::get_hl_id_by_name.

Source

pub fn virt_text_hide(&mut self, virt_text_hide: bool) -> &mut Self

Whether to hide the virtual text when the background text is selected or hidden due to horizontal scroll.

Source

pub fn virt_text_pos( &mut self, virt_text_pos: ExtmarkVirtTextPosition, ) -> &mut Self

Position of the virtual text.

Source

pub fn virt_text_win_col(&mut self, col: u32) -> &mut Self

Position the virtual text at a fixed window column (starting from the first text column).

Source

pub fn build(&mut self) -> SetExtmarkOpts

Builds the options.

Methods from Deref<Target = SetExtmarkOpts>§

Source

pub fn set_conceal(&mut self, conceal: Option<char>)

Source

pub fn set_cursorline_hl_group(&mut self, cursorline_hl_group: &str)

Source

pub fn set_end_col(&mut self, end_col: usize)

Source

pub fn set_end_right_gravity(&mut self, end_right_gravity: bool)

Source

pub fn set_end_row(&mut self, end_row: usize)

Source

pub fn set_ephemeral(&mut self, ephemeral: bool)

Source

pub fn set_hl_eol(&mut self, hl_eol: bool)

Source

pub fn set_hl_group(&mut self, hl_group: &str)

Source

pub fn set_hl_mode(&mut self, hl_mode: ExtmarkHlMode)

Source

pub fn set_id(&mut self, id: u32)

Source

pub fn set_line_hl_group(&mut self, line_hl_group: &str)

Source

pub fn set_number_hl_group(&mut self, number_hl_group: &str)

Source

pub fn set_priority(&mut self, priority: u32)

Source

pub fn set_right_gravity(&mut self, right_gravity: u32)

Source

pub fn set_sign_hl_group(&mut self, sign_hl_group: &str)

Source

pub fn set_sign_text(&mut self, sign_text: &str)

Source

pub fn set_strict(&mut self, strict: bool)

Source

pub fn set_virt_lines<Txt, Hl, Cnk, ChunkyCnk>(&mut self, virt_lines: ChunkyCnk)
where ChunkyCnk: IntoIterator<Item = Cnk>, Cnk: IntoIterator<Item = (Txt, Hl)>, Txt: Into<String>, Hl: StringOrListOfStrings,

Source

pub fn set_virt_lines_above(&mut self, virt_lines_above: bool)

Source

pub fn set_virt_lines_leftcol(&mut self, virt_lines_leftcol: bool)

Source

pub fn set_virt_text<Txt, Hl, Cnk>(&mut self, virt_text: Cnk)
where Cnk: IntoIterator<Item = (Txt, Hl)>, Txt: Into<String>, Hl: StringOrListOfStrings,

Source

pub fn set_virt_text_hide(&mut self, virt_text_hide: bool)

Source

pub fn set_virt_text_pos(&mut self, virt_text_pos: ExtmarkVirtTextPosition)

Source

pub fn set_virt_text_win_col(&mut self, virt_text_win_col: u32)

Trait Implementations§

Source§

impl Clone for SetExtmarkOptsBuilder

Source§

fn clone(&self) -> SetExtmarkOptsBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SetExtmarkOptsBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SetExtmarkOptsBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Deref for SetExtmarkOptsBuilder

Source§

type Target = SetExtmarkOpts

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for SetExtmarkOptsBuilder

Source§

fn deref_mut(&mut self) -> &mut <Self as Deref>::Target

Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.