Skip to content

Instantly share code, notes, and snippets.

@kmundnic
Created December 14, 2020 19:48
Show Gist options
  • Save kmundnic/822743d0f23a4a2e123d927eb7f3c1e0 to your computer and use it in GitHub Desktop.
Save kmundnic/822743d0f23a4a2e123d927eb7f3c1e0 to your computer and use it in GitHub Desktop.
Julia startup file
ENV["JULIA_ERROR_COLOR"] = :magenta
ENV["JULIA_WARN_COLOR"] = :yellow
ENV["JULIA_INFO_COLOR"] = :cyan
ENV["JULIA_STACKFRAME_LINEINFO_COLOR"] = :cyan
ENV["JULIA_STACKFRAME_FUNCTION_COLOR"] = :yellow
ENV["JULIA_EDITOR"] = "subl"
ENV["COLUMNS"] = 1000
push!(LOAD_PATH, expanduser("~/.julia/dev/"))
if VERSION < v"1.5"
atreplinit() do repl
try
@eval using Revise
@async Revise.wait_steal_repl_backend()
catch ArgumentError
@info "Installing package Revise"
@eval using Pkg
Pkg.add("Revise")
@eval using Revise
@async Revise.wait_steal_repl_backend()
end
end
else
try
using Revise
catch e
@warn(e.msg)
@info "Installing package Revise"
using Pkg
Pkg.add("Revise")
using Revise
end
end
atreplinit() do repl
try
@eval using Debugger
catch ArgumentError
@info "Installing package Rebugger"
@eval using Pkg
Pkg.add("Debugger")
@eval using Debugger
end
end
try
using Infiltrator
catch ArgumentError
@info "Installing package Infiltrator"
@eval using Pkg
Pkg.add("Infiltrator")
using Infiltrator
end
try
using BenchmarkTools
catch ArgumentError
@info "Installing package BenchmarkTools"
@eval using Pkg
Pkg.add("BenchmarkTools")
using BenchmarkTools
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment