fn default_config_path() -> Option<String> {
        std::env::var("XDG_CONFIG_HOME").ok().and_then(|xdg_config_home| {
            let p = PathBuf::from(xdg_config_home).join("page/init.vim");
            if p.exists() {
                log::trace!(target: "default config", "Use $XDG_CONFIG_HOME: {}", p.display());
                Some(p)
            } else {
                None
            }
        })
        .or_else(|| std::env::var("HOME").ok().and_then(|home_dir| {
            let p = PathBuf::from(home_dir).join(".config/page/init.vim");
            if p.exists() {
                log::trace!(target: "default config", "Use ~/.config: {}", p.display());
                Some(p)
            } else {
                None
            }
        }))
        .map(|p| p.to_string_lossy().to_string())
    }
/// Returns path to custom neovim config if it's present in corresponding locations
Returns path to custom neovim config if it's present in corresponding locations
Returns path to custom neovim config if it ' s present in corresponding locations
fn default_config_path() -> Option<String> {
        std::env::var("XDG_CONFIG_HOME").ok().and_then(|xdg_config_home| {
            let p = PathBuf::from(xdg_config_home).join("page/init.vim");
            if p.exists() {
                log::trace!(target: "default config", "Use $XDG_CONFIG_HOME: {}", p.display());
                Some(p)
            } else {
                None
            }
        })
        .or_else(|| std::env::var("HOME").ok().and_then(|home_dir| {
            let p = PathBuf::from(home_dir).join(".config/page/init.vim");
            if p.exists() {
                log::trace!(target: "default config", "Use ~/.config: {}", p.display());
                Some(p)
            } else {
                None
            }
        }))
        .map(|p| p.to_string_lossy().to_string())
    }
fn default_config_path ( ) -> Option < String > { std :: env :: var ( " " ) . ok ( ) . and_then ( | xdg_config_home | { let p = PathBuf :: from ( xdg_config_home ) . join ( " " ) ; if p . exists ( ) { log :: trace ! ( target " " " " p display ( ) ) ; Some ( p ) } else { None } } ) . or_else ( | | std :: env :: var ( " " ) . ok ( ) . and_then ( | home_dir | { let p = PathBuf :: from ( home_dir ) . join ( " " ) ; if p . exists ( ) { log :: trace ! ( target " " " " p display ( ) ) ; Some ( p ) } else { None } } ) ) . map ( | p | p . to_string_lossy ( ) . to_string ( ) ) }
Returns path to custom neovim config if it's present in corresponding locations
Returns path to custom neovim config if it ' s present in corresponding locations