pub trait Prompt: Send {
    fn render_prompt_left(&self) -> Cow<'_, str>;
    fn render_prompt_right(&self) -> Cow<'_, str>;
    fn render_prompt_indicator(
        &self,
        prompt_mode: PromptEditMode
    ) -> Cow<'_, str>; fn render_prompt_multiline_indicator(&self) -> Cow<'_, str>; fn render_prompt_history_search_indicator(
        &self,
        history_search: PromptHistorySearch
    ) -> Cow<'_, str>; fn get_prompt_color(&self) -> Color { ... } fn get_indicator_color(&self) -> Color { ... } fn get_prompt_right_color(&self) -> Color { ... } }
Expand description

API to provide a custom prompt.

Implementors have to provide str-based content which will be displayed before the LineBuffer is drawn.

Required Methods

Provide content off the right full prompt

Provide content off the left full prompt

Render the prompt indicator (Last part of the prompt that changes based on the editor mode)

Indicator to show before explicit new lines

Render the prompt indicator for Ctrl-R history search

Provided Methods

Get the default prompt color

Get the default indicator color

Get the default right prompt color

Implementors