pub struct MarkdownHook { /* private fields */ }Expand description
An editor hook providing Markdown shortcuts (Ctrl+B, Ctrl+I, Ctrl+K), smart list continuation, and task list toggles.
Implementations§
Source§impl MarkdownHook
impl MarkdownHook
Sourcepub fn with_config(config: MarkdownConfig) -> Self
pub fn with_config(config: MarkdownConfig) -> Self
Creates a hook honoring the given Markdown configuration.
Sourcepub fn set_interactive_tasks(&mut self, interactive: bool)
pub fn set_interactive_tasks(&mut self, interactive: bool)
Updates whether mouse clicks toggle task checkboxes.
Sourcepub fn interactive_tasks(&self) -> bool
pub fn interactive_tasks(&self) -> bool
Returns whether mouse clicks toggle task checkboxes.
Updates whether Tab / Shift+Tab move between table cells.
Returns whether table cell navigation is enabled.
Trait Implementations§
Source§impl Clone for MarkdownHook
impl Clone for MarkdownHook
Source§fn clone(&self) -> MarkdownHook
fn clone(&self) -> MarkdownHook
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarkdownHook
impl Debug for MarkdownHook
Source§impl Default for MarkdownHook
impl Default for MarkdownHook
Source§impl EditorHook for MarkdownHook
impl EditorHook for MarkdownHook
Source§fn on_key(&mut self, ctx: &mut HookContext<'_>, event: &KeyEvent) -> HookOutcome
fn on_key(&mut self, ctx: &mut HookContext<'_>, event: &KeyEvent) -> HookOutcome
Intercepts a key press before standard editor processing.
Source§fn on_click(
&mut self,
ctx: &mut HookContext<'_>,
row: usize,
_col: usize,
) -> HookOutcome
fn on_click( &mut self, ctx: &mut HookContext<'_>, row: usize, _col: usize, ) -> HookOutcome
Intercepts a mouse click at a given buffer line and source byte column. Read more
Source§fn status_text(&self) -> Option<&str>
fn status_text(&self) -> Option<&str>
Returns a human-readable status or active mode name, if any.
Source§fn on_search_action(
&mut self,
_ctx: &mut HookContext<'_>,
_action: SearchAction,
) -> HookOutcome
fn on_search_action( &mut self, _ctx: &mut HookContext<'_>, _action: SearchAction, ) -> HookOutcome
Handles a synthetic search-panel action (prompt-bar clicks). Read more
Source§fn before_insert(
&mut self,
_ctx: &mut HookContext<'_>,
_text: char,
) -> HookOutcome
fn before_insert( &mut self, _ctx: &mut HookContext<'_>, _text: char, ) -> HookOutcome
Intercepts text insertion before it is written to the buffer.
Source§fn after_edit(&mut self, _buffer: &mut EditorBuffer)
fn after_edit(&mut self, _buffer: &mut EditorBuffer)
Called immediately after any buffer mutation (typing, deletions, paste, undo/redo).
Source§fn on_selection_change(
&mut self,
_buffer: &EditorBuffer,
_selection: Option<&Selection>,
)
fn on_selection_change( &mut self, _buffer: &EditorBuffer, _selection: Option<&Selection>, )
Called whenever the cursor offset or selection range changes.
Contributes right-click context menu rows for the given click. Read more
Handles activation of a context menu row by
id. Read moreSource§fn search_snapshot(&self) -> Option<SearchSnapshot>
fn search_snapshot(&self) -> Option<SearchSnapshot>
Returns a live search-panel snapshot for renderers (toggles, matches). Read more
Auto Trait Implementations§
impl Freeze for MarkdownHook
impl RefUnwindSafe for MarkdownHook
impl Send for MarkdownHook
impl Sync for MarkdownHook
impl Unpin for MarkdownHook
impl UnsafeUnpin for MarkdownHook
impl UnwindSafe for MarkdownHook
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
Mutably borrows from an owned value. Read more