pub struct Config {
pub tab_stop: NonZeroUsize,
pub quit_times: usize,
pub message_dur: Duration,
pub show_line_num: bool,
}Expand description
The global Kibi configuration.
Fields§
§tab_stop: NonZeroUsizeThe size of a tab. Must be > 0.
quit_times: usizeThe number of confirmations needed before quitting, when changes have been made since the file was last changed.
message_dur: DurationThe duration for which messages are shown in the status bar.
show_line_num: boolWhether to display line numbers.
Implementations§
Source§impl Config
impl Config
Sourcepub fn load() -> Self
pub fn load() -> Self
Load the configuration, potentially overridden using config.ini files
that can be located in the following directories:
- On Linux, macOS, and other *nix systems:
/etc/kibi(system-wide configuration).$XDG_CONFIG_HOME/kibiif environment variable$XDG_CONFIG_HOMEis defined,$HOME/.config/kibiotherwise (user-level configuration).
- On Windows:
%APPDATA%\Kibi
Will print warnings to stderr if a file or line cannot be parsed properly.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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