pub struct Config {
pub editor: EditorConfig,
pub filesystem: FsysConfig,
pub tree_sitter: TsConfig,
pub colorscheme: ColorScheme,
pub filetypes: HashMap<String, FtypeConfig>,
pub keys: KeyBindings,
}Expand description
Editor level configuration
Fields§
§editor: EditorConfig§filesystem: FsysConfig§tree_sitter: TsConfig§colorscheme: ColorScheme§filetypes: HashMap<String, FtypeConfig>§keys: KeyBindingsImplementations§
Source§impl Config
impl Config
Sourcepub fn try_load_from_path(path: &str, home: &str) -> Result<Self, String>
pub fn try_load_from_path(path: &str, home: &str) -> Result<Self, String>
Attempt to load a config file from a specified location. If there are any errors while loading and parsing the file then they are reported as a formatted string for displaying to the user.
Sourcepub fn try_load_from_str(
s: &str,
path: &str,
home: &str,
) -> Result<Self, String>
pub fn try_load_from_str( s: &str, path: &str, home: &str, ) -> Result<Self, String>
Attempt to load a config file from its raw file contents as a string. If there are any errors while loading and parsing the file then they are reported as a formatted string for displaying to the user.
Sourcepub fn try_load() -> Result<Self, String>
pub fn try_load() -> Result<Self, String>
Attempt to load a config file from the default location.
If the config file doesn’t currently exist then the default config will be written to disk. If there are any errors while loading and parsing the file then they are reported as a formatted string for displaying to the user.
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.