ConfigDefaultsProvider

Trait ConfigDefaultsProvider 

Source
pub trait ConfigDefaultsProvider: Send + Sync {
    // Required methods
    fn workspace_paths_for(
        &self,
        workspace_root: &Path,
    ) -> Box<dyn WorkspacePaths>;
    fn home_config_paths(&self, config_file_name: &str) -> Vec<PathBuf>;
    fn syntax_theme(&self) -> String;
    fn syntax_languages(&self) -> Vec<String>;

    // Provided method
    fn config_file_name(&self) -> &str { ... }
}
Expand description

Provides access to filesystem and syntax defaults used by the configuration loader.

Required Methods§

Source

fn workspace_paths_for(&self, workspace_root: &Path) -> Box<dyn WorkspacePaths>

Creates a WorkspacePaths implementation for the provided workspace root.

Source

fn home_config_paths(&self, config_file_name: &str) -> Vec<PathBuf>

Returns the fallback configuration locations searched outside the workspace.

Source

fn syntax_theme(&self) -> String

Returns the default syntax highlighting theme identifier.

Source

fn syntax_languages(&self) -> Vec<String>

Returns the default list of syntax highlighting languages.

Provided Methods§

Source

fn config_file_name(&self) -> &str

Returns the primary configuration file name expected in a workspace.

Implementors§