Skip to content

Commit

Permalink
wip: removed dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
lazytanuki committed Dec 8, 2022
1 parent 7875188 commit 88dce0c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 58 deletions.
27 changes: 0 additions & 27 deletions helix-loader/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,3 @@ pub fn user_lang_config() -> Result<toml::Value, toml::de::Error> {

Ok(config)
}

/// Default built-in icons.toml.
pub fn default_icons_config() -> toml::Value {
toml::from_slice(include_bytes!("../../icons.toml"))
.expect("Could not parse built-in icons.toml to valid toml")
}

/// User configured icons.toml file, merged with the default config.
pub fn user_icons_config() -> Result<toml::Value, toml::de::Error> {
let config = crate::local_config_dirs()
.into_iter()
.chain([crate::config_dir()].into_iter())
.map(|path| path.join("icons.toml"))
.filter_map(|file| {
std::fs::read(&file)
.map(|config| toml::from_slice(&config))
.ok()
})
.collect::<Result<Vec<_>, _>>()?
.into_iter()
.chain([default_icons_config()].into_iter())
.fold(toml::Value::Table(toml::value::Table::default()), |a, b| {
crate::merge_toml_values(b, a, 3)
});

Ok(config)
}
31 changes: 0 additions & 31 deletions helix-view/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,37 +101,6 @@ pub struct Diagnostic {
pub hint: Icon,
}

#[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
pub struct SymbolKind {
pub file: Icon,
pub module: Icon,
pub namespace: Icon,
pub package: Icon,
pub class: Icon,
pub method: Icon,
pub property: Icon,
pub field: Icon,
pub constructor: Icon,
pub enumeration: Icon,
pub interface: Icon,
pub function: Icon,
pub variable: Icon,
pub constant: Icon,
pub string: Icon,
pub number: Icon,
pub boolean: Icon,
pub array: Icon,
pub object: Icon,
pub key: Icon,
pub null: Icon,
pub enum_member: Icon,
pub structure: Icon,
pub event: Icon,
pub operator: Icon,
pub type_parameter: Icon,
}

fn icon_color_to_style<'de, D>(deserializer: D) -> Result<Option<IconStyle>, D::Error>
where
D: serde::Deserializer<'de>,
Expand Down

0 comments on commit 88dce0c

Please sign in to comment.