diff --git a/helix-loader/src/config.rs b/helix-loader/src/config.rs index 2bdae3864aa20..259b1318ea00b 100644 --- a/helix-loader/src/config.rs +++ b/helix-loader/src/config.rs @@ -40,30 +40,3 @@ pub fn user_lang_config() -> Result { 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 { - 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::, _>>()? - .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) -} diff --git a/helix-view/src/icons.rs b/helix-view/src/icons.rs index e8ed238b51f45..e2d97c86f973d 100644 --- a/helix-view/src/icons.rs +++ b/helix-view/src/icons.rs @@ -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, D::Error> where D: serde::Deserializer<'de>,