-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixes freezes when app starts - Fixes golang code highlighting - Improves themes in edit mode #1269
- Loading branch information
1 parent
af5c3c8
commit 39cd1a1
Showing
11 changed files
with
1,325 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// | ||
// HighlighterTheme.swift | ||
// FSNotes | ||
// | ||
// Created by Александр on 09.01.2022. | ||
// Copyright © 2022 Oleksandr Glushchenko. All rights reserved. | ||
// | ||
|
||
enum HighlighterTheme: String { | ||
case github = "github" | ||
case solarizedLight = "solarized-light" | ||
case solarizedDark = "solarized-dark" | ||
case visualStudio = "vs" | ||
case atomOneLight = "atom-one-light" | ||
case atomOneDark = "atom-one-dark" | ||
case monokaiSublime = "monokai-sublime" | ||
case xcode = "xcode" | ||
case zenburn = "zenburn" | ||
case tomorrow = "tomorrow" | ||
case agate = "agate" | ||
|
||
static func named(rawValue: String) -> HighlighterTheme { | ||
switch rawValue { | ||
case "github": return .github | ||
case "solarized-light": return .solarizedLight | ||
case "solarized-dark": return .solarizedDark | ||
case "vs": return .visualStudio | ||
case "atom-one-light": return .atomOneLight | ||
case "atom-one-dark": return .atomOneDark | ||
case "monokai-sublime": return .monokaiSublime | ||
case "xcode": return .xcode | ||
case "zendburn": return .zenburn | ||
case "tomorrow": return .tomorrow | ||
case "agate": return .agate | ||
default: return .github | ||
} | ||
} | ||
|
||
public var backgroundHex: String { | ||
switch self { | ||
case .github: return "#f8f8f8" | ||
case .solarizedLight: return "#fdf6e3" | ||
case .solarizedDark: return "#002b36" | ||
case .visualStudio: return "#f8f8f8" | ||
case .atomOneLight: return "#fafafa" | ||
case .atomOneDark: return "#282c34" | ||
case .monokaiSublime: return "#23241f" | ||
case .xcode: return "#f8f8f8" | ||
case .zenburn: return "#3f3f3f" | ||
case .tomorrow: return "#f8f8f8" | ||
case .agate: return "#333333" | ||
} | ||
} | ||
} |
Oops, something went wrong.