Skip to content

Commit

Permalink
Merge pull request #479 from CosmicHorrorDev/theme-partialeq
Browse files Browse the repository at this point in the history
implement PartialEq for Theme
  • Loading branch information
Enselic committed Jul 21, 2023
2 parents b8f7eb6 + 5e76202 commit 945771d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/highlighting/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
/// A theme parsed from a `.tmTheme` file.
///
/// This contains additional fields useful for a theme list as well as `settings` for styling your editor.
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
pub struct Theme {
pub name: Option<String>,
pub author: Option<String>,
Expand All @@ -23,7 +23,7 @@ pub struct Theme {
/// This essentially consists of the styles that aren't directly applied to the text being viewed.
/// `ThemeSettings` are intended to be used to make the UI of the editor match the styling of the
/// text itself.
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
pub struct ThemeSettings {
/// The default color for text.
pub foreground: Option<Color>,
Expand Down Expand Up @@ -110,15 +110,15 @@ pub struct ThemeSettings {

/// A component of a theme meant to highlight a specific thing (e.g string literals)
/// in a certain way.
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
pub struct ThemeItem {
/// Target scope name.
pub scope: ScopeSelectors,
/// The style to use for this component
pub style: StyleModifier,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum UnderlineOption {
None,
Underline,
Expand Down

0 comments on commit 945771d

Please sign in to comment.