Last active
October 23, 2019 17:44
-
-
Save dillondaudert/8e23728240c0a305a30f5ed424aa0f92 to your computer and use it in GitHub Desktop.
Julia REPL startup: OhMyREPL.jl Solarized color theme
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
atreplinit() do repl | |
try | |
@eval using Crayons | |
@eval import OhMyREPL: Passes.SyntaxHighlighter | |
@eval function solarized_colorscheme() | |
# solarized crayons | |
base03 = crayon"#002b36" | |
base02 = crayon"#073642" | |
base01 = crayon"#586e75" | |
base00 = crayon"#657b83" | |
base0 = crayon"#839496" | |
base1 = crayon"#93a1a1" | |
base2 = crayon"#eee8d5" | |
base3 = crayon"#fdf6e3" | |
yellow = crayon"#b58900" | |
orange = crayon"#cb4b16" | |
red = crayon"#dc322f" | |
magenta = crayon"#d33682" | |
violet = crayon"#6c71c4" | |
blue = crayon"#268bd2" | |
cyan = crayon"#2aa198" | |
green = crayon"#859900" | |
scheme = SyntaxHighlighter.ColorScheme() | |
SyntaxHighlighter.text!(scheme, base1) | |
SyntaxHighlighter.number!(scheme, magenta) | |
SyntaxHighlighter.macro!(scheme, yellow) | |
SyntaxHighlighter.symbol!(scheme, orange) | |
SyntaxHighlighter.comment!(scheme, base0) | |
SyntaxHighlighter.string!(scheme, cyan) | |
SyntaxHighlighter.call!(scheme, blue) | |
SyntaxHighlighter.op!(scheme, green) | |
SyntaxHighlighter.keyword!(scheme, red) | |
SyntaxHighlighter.function_def!(scheme, blue) | |
SyntaxHighlighter.argdef!(scheme, base00) | |
SyntaxHighlighter.add!("SolarizedDark", scheme) | |
end | |
@eval solarized_colorscheme() | |
@eval using OhMyREPL | |
@eval colorscheme!("SolarizedDark") | |
catch e | |
@warn "error while import OhMyREPL" e | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment