mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Clean up unused code
This commit is contained in:
parent
152ac6927f
commit
95a0827517
@ -18,16 +18,6 @@ use vscode::VsCodeThemeConverter;
|
||||
use crate::theme_printer::ThemeFamilyPrinter;
|
||||
use crate::vscode::VsCodeTheme;
|
||||
|
||||
pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: uuid::Uuid::new_v4().to_string(),
|
||||
name: name.into(),
|
||||
author: author.into(),
|
||||
themes: Vec::new(),
|
||||
scales: default_color_scales(),
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct FamilyMetadata {
|
||||
pub name: String,
|
||||
|
@ -1,14 +1,10 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use anyhow::Result;
|
||||
use gpui::{Hsla, Refineable, Rgba};
|
||||
use serde::Deserialize;
|
||||
use theme::{
|
||||
default_color_scales, Appearance, ColorScales, GitStatusColors, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeColorsRefinement, ThemeFamily, ThemeStyles,
|
||||
ThemeVariant,
|
||||
Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors,
|
||||
ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::ThemeMetadata;
|
||||
|
||||
@ -34,41 +30,6 @@ pub struct VsCodeColors {
|
||||
editor: String,
|
||||
}
|
||||
|
||||
pub(crate) fn new_theme_family_from_vsc(path: &Path) -> Result<ThemeFamily> {
|
||||
todo!()
|
||||
|
||||
// let path_str = path.to_str().unwrap();
|
||||
// let family_name = path_str.split('/').last().unwrap();
|
||||
|
||||
// let mut json_files: Vec<String> = Vec::new();
|
||||
|
||||
// if path.is_dir() {
|
||||
// for entry in std::fs::read_dir(path).unwrap() {
|
||||
// let entry = entry.unwrap();
|
||||
// let path = entry.path();
|
||||
// if path.is_file() {
|
||||
// if let Some(extension) = path.extension() {
|
||||
// if extension == "json" {
|
||||
// json_files.push(path.file_name().unwrap().to_str().unwrap().to_string());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// anyhow::bail!("Path is not a directory");
|
||||
// }
|
||||
|
||||
// let mut theme_family = ThemeFamily {
|
||||
// id: uuid::Uuid::new_v4().to_string(),
|
||||
// name: family_name.into(),
|
||||
// author: "New Theme Family".into(),
|
||||
// themes: Vec::new(),
|
||||
// scales: default_color_scales(),
|
||||
// };
|
||||
|
||||
// Ok(theme_family)
|
||||
}
|
||||
|
||||
fn try_parse_color(color: &str) -> Result<Hsla> {
|
||||
Ok(Rgba::try_from(color)?.into())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user