update: nvim: julials use sysimage only if it exists

This commit is contained in:
qwjyh 2023-10-06 20:30:13 +09:00
parent 88961e0879
commit dbab80f182

View file

@ -461,11 +461,20 @@ lspconfig.lua_ls.setup {
}, },
} }
-- Julia -- Julia
-- use sysimage only if it exists
local julials_so = os.getenv("HOME") .. "/.julia/environments/nvim-lspconfig/sys-ls.so"
local julials_so_option = { "", ""}
if io.open(julials_so) then
julials_so_option = {
"-J", julials_so
}
end
-- main
lspconfig.julials.setup { lspconfig.julials.setup {
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
cmd = { "julia", "--startup-file=no", "--history-file=no", "-J", cmd = { "julia", "--startup-file=no", "--history-file=no",
os.getenv("HOME") .. "/.julia/environments/nvim-lspconfig/sys-ls.so", julials_so_option[1], julials_so_option[2],
-- use below 2 lines to collect script to be included in sysimage -- use below 2 lines to collect script to be included in sysimage
'--trace-compile', '--trace-compile',
os.getenv("HOME") .. "/.julia/environments/nvim-lspconfig/tracecompile.jl", os.getenv("HOME") .. "/.julia/environments/nvim-lspconfig/tracecompile.jl",