pub struct Options {
pub wrap: bool,
pub tab_width: usize,
}Expand description
The settings shared by every idet frontend, stored as one line per option
under $XDG_CONFIG_HOME/idet/options.conf.
Editors read them at startup and write them back the moment one changes. Two editors running at once each keep their own copy, and the last one to change an option is the one whose value survives on disk.
Fields§
§wrap: boolWhether a line too long for the window continues on the next screen row rather than running off the side. The text on disk is untouched either way.
tab_width: usizeHow many spaces one indentation step adds or removes.
Implementations§
Source§impl Options
impl Options
Sourcepub fn load() -> Self
pub fn load() -> Self
Reads the options file, falling back to the defaults for anything it does not name and for a file that is missing or unreadable.
Sourcepub fn save(&self) -> Result<()>
pub fn save(&self) -> Result<()>
Writes the options back to their file, creating the directory if it is not there yet.
§Errors
Fails when the config directory cannot be determined or written to.