aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp/JuliaProject.toml10
-rw-r--r--lua/nvim_lsp/julials.lua10
2 files changed, 15 insertions, 5 deletions
diff --git a/lua/nvim_lsp/JuliaProject.toml b/lua/nvim_lsp/JuliaProject.toml
new file mode 100644
index 00000000..300d526c
--- /dev/null
+++ b/lua/nvim_lsp/JuliaProject.toml
@@ -0,0 +1,10 @@
+[deps]
+CSTParser = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
+DocumentFormat = "ffa9a821-9c82-50df-894e-fbcef3ed31cd"
+FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
+JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
+LanguageServer = "2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7"
+StaticLint = "b3cc710f-9c33-5bdb-a03d-a94903873e97"
+SymbolServer = "cf896787-08d5-524d-9de7-132aaa0cb996"
+Tokenize = "0796e94c-ce3b-5d07-9a54-7f471281c624"
+URIParser = "30578b45-9adc-5946-b283-645ec420af67"
diff --git a/lua/nvim_lsp/julials.lua b/lua/nvim_lsp/julials.lua
index f202a7e0..14569aa1 100644
--- a/lua/nvim_lsp/julials.lua
+++ b/lua/nvim_lsp/julials.lua
@@ -1,12 +1,12 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-print(vim.fn.expand('<sfile>:p:h'))
+current_directory = debug.getinfo(1).short_src:match("(.*[/\\])")
configs.julials = {
default_config = {
cmd = {
- "julia", "--project", "--startup-file=no", "--history-file=no", "-e", [[
+ "julia", "--project=" .. current_directory, "--startup-file=no", "--history-file=no", "-e", [[
using Pkg;
Pkg.instantiate()
using LanguageServer; using SymbolServer;
@@ -32,7 +32,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"); Pkg.add("SymbolServer")'
+julia --project=/path/to/nvim_lsp/lua/nvim_lsp -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
```
]];
};
@@ -40,7 +40,7 @@ julia -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
configs.julials.install = function()
local script = [[
- julia -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
+ julia --project=]] .. current_directory .. [[ -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
]]
util.sh(script, vim.loop.os_homedir())
@@ -48,7 +48,7 @@ end
configs.julials.install_info = function()
local script = [[
- julia -e 'using LanguageServer; using SymbolServer'
+ julia --project=]] .. current_directory .. [[ -e 'using LanguageServer; using SymbolServer'
]]
local status = pcall(vim.fn.system, script)