pub struct App { /* private fields */ }Expand description
Main application state
Implementations§
Source§impl App
impl App
Sourcepub fn from_string(content: &str) -> Result<Self>
pub fn from_string(content: &str) -> Result<Self>
Create app from a string content (for pipe mode)
Sourcepub fn buffer(&self) -> &DocumentBuffer
pub fn buffer(&self) -> &DocumentBuffer
Get the document buffer
Sourcepub fn buffer_mut(&mut self) -> &mut DocumentBuffer
pub fn buffer_mut(&mut self) -> &mut DocumentBuffer
Get mutable document buffer
Sourcepub fn set_pipe_mode(&mut self, pipe_mode: bool)
pub fn set_pipe_mode(&mut self, pipe_mode: bool)
Set pipe mode (stdin/stdout piped)
Sourcepub fn should_quit(&self) -> bool
pub fn should_quit(&self) -> bool
Check if the app should quit
Sourcepub fn scroll_offset(&self) -> usize
pub fn scroll_offset(&self) -> usize
Get scroll offset
Sourcepub fn image_manager(&self) -> &ImageManager
pub fn image_manager(&self) -> &ImageManager
Get image manager
Sourcepub fn image_manager_mut(&mut self) -> &mut ImageManager
pub fn image_manager_mut(&mut self) -> &mut ImageManager
Get mutable image manager
Sourcepub fn diagnostics_manager(&self) -> &DiagnosticsManager
pub fn diagnostics_manager(&self) -> &DiagnosticsManager
Get diagnostics manager
Sourcepub fn code_renderer(&self) -> &CodeRenderer
pub fn code_renderer(&self) -> &CodeRenderer
Get code renderer
Sourcepub fn code_renderer_mut(&mut self) -> &mut CodeRenderer
pub fn code_renderer_mut(&mut self) -> &mut CodeRenderer
Get mutable code renderer
Sourcepub fn status_message(&self) -> Option<&str>
pub fn status_message(&self) -> Option<&str>
Get status message
Sourcepub fn set_status_message(&mut self, message: String)
pub fn set_status_message(&mut self, message: String)
Set status message
Sourcepub fn clear_status_message(&mut self)
pub fn clear_status_message(&mut self)
Clear status message
Sourcepub fn filtered_completion_items(&self) -> &[CompletionItem]
pub fn filtered_completion_items(&self) -> &[CompletionItem]
Get completion items (filtered by current input)
Sourcepub fn completion_selected(&self) -> usize
pub fn completion_selected(&self) -> usize
Get selected completion index
Sourcepub fn show_completion(&self) -> bool
pub fn show_completion(&self) -> bool
Check if completion popup is visible
Sourcepub fn file_tree_mut(&mut self) -> Option<&mut FileTree>
pub fn file_tree_mut(&mut self) -> Option<&mut FileTree>
Get mutable file tree
Sourcepub fn is_file_browser_visible(&self) -> bool
pub fn is_file_browser_visible(&self) -> bool
Check if file browser is visible
Sourcepub fn toggle_file_browser(&mut self)
pub fn toggle_file_browser(&mut self)
Toggle file browser visibility
Sourcepub fn show_line_numbers(&self) -> bool
pub fn show_line_numbers(&self) -> bool
Check if line numbers are visible
Sourcepub fn toggle_line_numbers(&mut self)
pub fn toggle_line_numbers(&mut self)
Toggle line numbers visibility
Sourcepub fn show_current_line_highlight(&self) -> bool
pub fn show_current_line_highlight(&self) -> bool
Check if current line highlight is visible
Sourcepub fn toggle_current_line_highlight(&mut self)
pub fn toggle_current_line_highlight(&mut self)
Toggle current line highlight visibility
Sourcepub fn line_number_gutter_width(&self) -> u16
pub fn line_number_gutter_width(&self) -> u16
Calculate the width of line number gutter (including separator)
Sourcepub fn poll_lsp_events(&mut self)
pub fn poll_lsp_events(&mut self)
Poll LSP events and update diagnostics
Sourcepub fn request_go_to_definition(&mut self) -> Result<()>
pub fn request_go_to_definition(&mut self) -> Result<()>
Request go to definition at current cursor position
Navigate back in history
Navigate forward in history
Sourcepub fn request_completion(
&mut self,
trigger_character: Option<String>,
) -> Result<()>
pub fn request_completion( &mut self, trigger_character: Option<String>, ) -> Result<()>
Request code completion at current cursor position
Sourcepub fn apply_completion(&mut self) -> Result<()>
pub fn apply_completion(&mut self) -> Result<()>
Apply the selected completion item
Sourcepub fn completion_up(&mut self)
pub fn completion_up(&mut self)
Move completion selection up
Sourcepub fn completion_down(&mut self)
pub fn completion_down(&mut self)
Move completion selection down
Sourcepub fn cancel_completion(&mut self)
pub fn cancel_completion(&mut self)
Cancel completion popup
Sourcepub fn show_quit_dialog(&self) -> bool
pub fn show_quit_dialog(&self) -> bool
Check if quit dialog is visible
Sourcepub fn confirm_quit(&mut self)
pub fn confirm_quit(&mut self)
Confirm quit (called when user confirms in dialog)
Sourcepub fn cancel_quit_dialog(&mut self)
pub fn cancel_quit_dialog(&mut self)
Cancel quit dialog
Sourcepub fn show_search_dialog(&self) -> bool
pub fn show_search_dialog(&self) -> bool
Check if search dialog is visible
Sourcepub fn search_query(&self) -> &str
pub fn search_query(&self) -> &str
Get search query
Sourcepub fn replace_query(&self) -> &str
pub fn replace_query(&self) -> &str
Get replace query
Sourcepub fn search_mode(&self) -> SearchMode
pub fn search_mode(&self) -> SearchMode
Get search mode
Sourcepub fn search_match_count(&self) -> usize
pub fn search_match_count(&self) -> usize
Get search results count
Sourcepub fn search_current_index(&self) -> Option<usize>
pub fn search_current_index(&self) -> Option<usize>
Get current search index
Sourcepub fn search_active_field(&self) -> SearchField
pub fn search_active_field(&self) -> SearchField
Get active search field
Sourcepub fn show_save_as_dialog(&self) -> bool
pub fn show_save_as_dialog(&self) -> bool
Check if save-as dialog is visible
Sourcepub fn save_as_filename(&self) -> &str
pub fn save_as_filename(&self) -> &str
Get save-as filename
Sourcepub fn show_goto_line_dialog(&self) -> bool
pub fn show_goto_line_dialog(&self) -> bool
Check if goto line dialog is visible
Sourcepub fn goto_line_input(&self) -> &str
pub fn goto_line_input(&self) -> &str
Get goto line input
Sourcepub fn open_goto_line_dialog(&mut self)
pub fn open_goto_line_dialog(&mut self)
Open goto line dialog
Sourcepub fn close_goto_line_dialog(&mut self)
pub fn close_goto_line_dialog(&mut self)
Close goto line dialog
Sourcepub fn confirm_goto_line(&mut self) -> Result<()>
pub fn confirm_goto_line(&mut self) -> Result<()>
Confirm goto line with the entered line number
Sourcepub fn show_mq_query_dialog(&self) -> bool
pub fn show_mq_query_dialog(&self) -> bool
Check if mq query dialog is visible
Sourcepub fn mq_query_input(&self) -> &str
pub fn mq_query_input(&self) -> &str
Get mq query input
Sourcepub fn mq_query_result(&self) -> Option<&str>
pub fn mq_query_result(&self) -> Option<&str>
Get mq query result
Sourcepub fn open_mq_query_dialog(&mut self)
pub fn open_mq_query_dialog(&mut self)
Open mq query dialog
Sourcepub fn close_mq_query_dialog(&mut self)
pub fn close_mq_query_dialog(&mut self)
Close mq query dialog
Sourcepub fn execute_mq_query(&mut self)
pub fn execute_mq_query(&mut self)
Execute mq query against the current buffer content
Sourcepub fn open_save_as_dialog(&mut self)
pub fn open_save_as_dialog(&mut self)
Open save-as dialog
Sourcepub fn close_save_as_dialog(&mut self)
pub fn close_save_as_dialog(&mut self)
Close save-as dialog
Sourcepub fn confirm_save_as(&mut self) -> Result<()>
pub fn confirm_save_as(&mut self) -> Result<()>
Confirm save-as with the entered filename
Sourcepub fn open_search(&mut self)
pub fn open_search(&mut self)
Open search dialog
Sourcepub fn open_replace(&mut self)
pub fn open_replace(&mut self)
Open replace dialog
Sourcepub fn close_search(&mut self)
pub fn close_search(&mut self)
Close search dialog
Sourcepub fn search_next(&mut self)
pub fn search_next(&mut self)
Find next match
Sourcepub fn search_prev(&mut self)
pub fn search_prev(&mut self)
Find previous match
Sourcepub fn replace_current(&mut self)
pub fn replace_current(&mut self)
Replace current match
Sourcepub fn replace_all(&mut self)
pub fn replace_all(&mut self)
Replace all matches
Sourcepub fn toggle_search_field(&mut self)
pub fn toggle_search_field(&mut self)
Toggle between search and replace fields
Sourcepub fn handle_key(&mut self, key: KeyEvent) -> Result<()>
pub fn handle_key(&mut self, key: KeyEvent) -> Result<()>
Handle keyboard input
Sourcepub fn handle_paste(&mut self, text: String) -> Result<()>
pub fn handle_paste(&mut self, text: String) -> Result<()>
Handle paste event (used for IME input and clipboard paste)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl !UnwindSafe for App
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> 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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().