pub struct ConfigManager { /* private fields */ }Implementations§
Source§impl ConfigManager
impl ConfigManager
pub fn new(config_dir: Option<PathBuf>, extras_dir: Option<PathBuf>) -> Self
Sourcepub fn set_languages(&mut self, languages: Languages)
pub fn set_languages(&mut self, languages: Languages)
Set the available LanguageDefinitions. Overrides any previous values.
pub fn language_for_path(&self, path: &Path) -> Option<LanguageId>
Sourcepub fn set_user_config(
&mut self,
domain: ConfigDomain,
config: Table,
) -> Result<Vec<(BufferId, Table)>, ConfigError>
pub fn set_user_config( &mut self, domain: ConfigDomain, config: Table, ) -> Result<Vec<(BufferId, Table)>, ConfigError>
Sets the config for the given domain, removing any existing config.
Returns a Vec of individual buffer config changes that result from
this update, or a ConfigError if config is poorly formed.
Sourcepub fn domain_for_path(&self, path: &Path) -> Option<ConfigDomain>
pub fn domain_for_path(&self, path: &Path) -> Option<ConfigDomain>
Returns the ConfigDomain relevant to a given file, if one exists.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigManager
impl RefUnwindSafe for ConfigManager
impl Send for ConfigManager
impl Sync for ConfigManager
impl Unpin for ConfigManager
impl UnwindSafe for ConfigManager
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