Skip to content

Commit a417f2f

Browse files
committed
Ensure Julia environment is set before julia-lsp is run
1 parent eaa3488 commit a417f2f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lua/mason-lspconfig/lsp/julials.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
return {
2-
cmd = { "julia-lsp" },
3-
before_init = function(_, config)
2+
cmd = function(dispatchers, config)
43
local _ = require "mason-core.functional"
54
local path = require "mason-core.path"
65
local fs = require "mason-core.fs"
@@ -30,10 +29,11 @@ return {
3029
end
3130
end
3231

33-
config.cmd = { "julia-lsp", env_path }
34-
config.cmd_env = vim.tbl_extend("keep", config.cmd_env or {}, {
32+
local cmd_env = vim.tbl_extend("keep", config.cmd_env or {}, {
3533
SYMBOL_SERVER = config.symbol_server,
3634
SYMBOL_CACHE_DOWNLOAD = (config.symbol_cache_download == false) and "0" or "1",
3735
})
36+
37+
return vim.lsp.rpc.start({ "julia-lsp", env_path }, dispatchers, { env = cmd_env })
3838
end,
3939
}

0 commit comments

Comments
 (0)