Unified · Split
| @@ -310,63 +310,5 @@ impl VsCodeThemeConverter { · 309 unmodified lines | ||
| 310 | 310 | Ok(UserSyntaxTheme { |
| 311 | 311 | highlights: highlight_styles.into_iter().collect(), |
| 312 | 312 | }) |
| 313 | − | |
| 314 | − // let mut highlight_styles = IndexMap::new(); | |
| 315 | − | |
| 316 | − // for token_color in self.theme.token_colors { | |
| 317 | − // highlight_styles.extend(token_color.highlight_styles()?); | |
| 318 | − // } | |
| 319 | − | |
| 320 | − // let syntax_theme = UserSyntaxTheme { | |
| 321 | − // highlights: highlight_styles.into_iter().collect(), | |
| 322 | − // }; | |
| 323 | − | |
| 324 | − // pub fn highlight_styles(&self) -> Result<IndexMap<String, UserHighlightStyle>> { | |
| 325 | − // let mut highlight_styles = IndexMap::new(); | |
| 326 | − | |
| 327 | − // for syntax_token in ZedSyntaxToken::iter() { | |
| 328 | − // let scope = syntax_token.to_scope(); | |
| 329 | − | |
| 330 | − // // let token_color = | |
| 331 | − // } | |
| 332 | − | |
| 333 | − // let scope = match self.scope { | |
| 334 | − // Some(VsCodeTokenScope::One(ref scope)) => vec![scope.clone()], | |
| 335 | − // Some(VsCodeTokenScope::Many(ref scopes)) => scopes.clone(), | |
| 336 | − // None => return Ok(IndexMap::new()), | |
| 337 | − // }; | |
| 338 | − | |
| 339 | − // for scope in &scope { | |
| 340 | − // let Some(syntax_token) = Self::to_zed_token(&scope) else { | |
| 341 | − // continue; | |
| 342 | − // }; | |
| 343 | − | |
| 344 | − // let highlight_style = UserHighlightStyle { | |
| 345 | − // color: self | |
| 346 | − // .settings | |
| 347 | − // .foreground | |
| 348 | − // .as_ref() | |
| 349 | − // .traverse(|color| try_parse_color(&color))?, | |
| 350 | − // font_style: self | |
| 351 | − // .settings | |
| 352 | − // .font_style | |
| 353 | − // .as_ref() | |
| 354 | − // .and_then(|style| try_parse_font_style(&style)), | |
| 355 | − // font_weight: self | |
| 356 | − // .settings | |
| 357 | − // .font_style | |
| 358 | − // .as_ref() | |
| 359 | − // .and_then(|style| try_parse_font_weight(&style)), | |
| 360 | − // }; | |
| 361 | − | |
| 362 | − // if highlight_style.is_empty() { | |
| 363 | − // continue; | |
| 364 | − // } | |
| 365 | − | |
| 366 | − // highlight_styles.insert(syntax_token, highlight_style); | |
| 367 | − // } | |
| 368 | − | |
| 369 | − // Ok(highlight_styles) | |
| 370 | − // } | |
| 371 | 313 | } |
| 372 | 314 | } |