|
|
|
@ -69,10 +69,13 @@ local on_attach = function(client, bufnr) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Julia LSP (LanguageServer.jl) |
|
|
|
-- Julia LSP (LanguageServer.jl) |
|
|
|
|
|
|
|
local REVISE_LANGUAGESERVER = false |
|
|
|
require'lspconfig'.julials.setup({ |
|
|
|
require'lspconfig'.julials.setup({ |
|
|
|
on_new_config = function(new_config, _) |
|
|
|
on_new_config = function(new_config, _) |
|
|
|
local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia") |
|
|
|
local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia") |
|
|
|
if require'lspconfig'.util.path.is_file(julia) then |
|
|
|
if REVISE_LANGUAGESERVER then |
|
|
|
|
|
|
|
new_config.cmd[5] = (new_config.cmd[5]):gsub("using LanguageServer", "using Revise; using LanguageServer; if isdefined(LanguageServer, :USE_REVISE); LanguageServer.USE_REVISE[] = true; end") |
|
|
|
|
|
|
|
elseif require'lspconfig'.util.path.is_file(julia) then |
|
|
|
new_config.cmd[1] = julia |
|
|
|
new_config.cmd[1] = julia |
|
|
|
end |
|
|
|
end |
|
|
|
end, |
|
|
|
end, |
|
|
|
|