aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorDheepak Krishnamurthy <me@kdheepak.com>2020-06-01 18:34:36 -0600
committerDheepak Krishnamurthy <me@kdheepak.com>2020-06-08 21:32:50 -0600
commitba94ffeb8cdf2d549b26a715a16539b3f79031e8 (patch)
tree1d4cf84c6d306481f4cc3c5b7612df30c24004df /lua
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-ba94ffeb8cdf2d549b26a715a16539b3f79031e8.tar
nvim-lspconfig-ba94ffeb8cdf2d549b26a715a16539b3f79031e8.tar.gz
nvim-lspconfig-ba94ffeb8cdf2d549b26a715a16539b3f79031e8.tar.bz2
nvim-lspconfig-ba94ffeb8cdf2d549b26a715a16539b3f79031e8.tar.lz
nvim-lspconfig-ba94ffeb8cdf2d549b26a715a16539b3f79031e8.tar.xz
nvim-lspconfig-ba94ffeb8cdf2d549b26a715a16539b3f79031e8.tar.zst
nvim-lspconfig-ba94ffeb8cdf2d549b26a715a16539b3f79031e8.zip
Fix julials configuration
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp/julials.lua20
1 files changed, 14 insertions, 6 deletions
diff --git a/lua/nvim_lsp/julials.lua b/lua/nvim_lsp/julials.lua
index 947fdea1..b821c283 100644
--- a/lua/nvim_lsp/julials.lua
+++ b/lua/nvim_lsp/julials.lua
@@ -5,10 +5,18 @@ configs.julials = {
default_config = {
cmd = {
"julia", "--project", "--startup-file=no", "--history-file=no", "-e", [[
- using LanguageServer;
using Pkg;
- server = LanguageServer.LanguageServerInstance(stdin, stdout, false, dirname(Pkg.Types.Context().env.project_file));
- server.runlinter = true; run(server);
+ Pkg.instantiate()
+ using LanguageServer; using SymbolServer;
+ depot_path = get(ENV, "JULIA_DEPOT_PATH", "")
+ project_path = dirname(Pkg.Types.Context().env.project_file)
+ # Make sure that we only load packages from this environment specifically.
+ empty!(LOAD_PATH)
+ push!(LOAD_PATH, "@")
+ @info "Running language server" env=Base.load_path()[1] pwd() project_path depot_path
+ server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path);
+ server.runlinter = true;
+ run(server);
]]
};
filetypes = {'julia'};
@@ -22,7 +30,7 @@ configs.julials = {
https://github.com/julia-vscode/julia-vscode
`LanguageServer.jl` can be installed via `:LspInstall julials` or by yourself the `julia` and `Pkg`:
```sh
-julia -e 'using Pkg; Pkg.add("LanguageServer")'
+julia -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
```
]];
};
@@ -30,7 +38,7 @@ julia -e 'using Pkg; Pkg.add("LanguageServer")'
configs.julials.install = function()
local script = [[
- julia -e 'using Pkg; Pkg.add("LanguageServer")'
+ julia -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
]]
util.sh(script, vim.loop.os_homedir())
@@ -38,7 +46,7 @@ end
configs.julials.install_info = function()
local script = [[
- julia -e 'using LanguageServer'
+ julia -e 'using LanguageServer; using SymbolServer'
]]
local status = pcall(vim.fn.system, script)