Mostly for personal use. Wraps Pkg
, LanguageServer.jl
, TestEnv
+ReTest
, and maybe one day JuliaFormatter into a little box you can access through the cli (without waiting on precompilation)
git clone git@github.com:josephsdavid/juliacli.git
cd juliacli
./INSTALL
As long as ~/.julia/bin/
is in your $PATH, everything should be good to go!
This is in active development for personal use, and i am totally new to julia. Use at your own risk (or make an issue and i will listen)
quick demo, generates a project, adds things to project
juliacli -h
juliacli pkg -h
juliacli formatter -h
juliacli server -h
juliacli pkg generate JuliacliDemo
cd JuliacliDemo
juliacli pkg status
juliacli pkg add JSON
juliacli pkg add DataStructures
juliacli pkg status
juliacli pc # compiles with "using"
juliacli pc --use-pkg # compiles with pkg.precompile
juliacli test # runs pkg.test
# in a retest enabled project, activates test env, loads test module, and retests the argument
juliacli test testset-name
To set up the LSP to use the wrapped and compiled LanguageServer, try somehting like the below snippet. This lowers language server start time to a few seconds (from 20-30 seconds), because we dont waste forever precompiling everything
local nvim_lsp = require"lspconfig"
local servers = {
julials = {
cmd = {"juliacli", "server"},
settings = {
julia = {
usePlotPane = false,
symbolCacheDownload = false,
runtimeCompletions = true,
singleFileSupport = true,
useRevise = true,
lint = {
NumThreads = 11,
missingrefs = "all",
iter = true,
lazy = true,
modname = true,
},
},
},
},
}
for lsp, setup in pairs(servers) do
setup.on_attach = on_attach
setup.capabilities = make_capabilities()
nvim_lsp[lsp].setup(setup)
end