aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorDheepak Krishnamurthy <me@kdheepak.com>2020-06-08 11:09:27 -0600
committerDheepak Krishnamurthy <me@kdheepak.com>2020-06-08 21:32:50 -0600
commit1a6dab943c2e4639d689f71f21a62a856ef70b3c (patch)
tree36f6190d50ef46c00717f93a856599551a8e33da /lua
parentUse current folder as Julia project (diff)
downloadnvim-lspconfig-1a6dab943c2e4639d689f71f21a62a856ef70b3c.tar
nvim-lspconfig-1a6dab943c2e4639d689f71f21a62a856ef70b3c.tar.gz
nvim-lspconfig-1a6dab943c2e4639d689f71f21a62a856ef70b3c.tar.bz2
nvim-lspconfig-1a6dab943c2e4639d689f71f21a62a856ef70b3c.tar.lz
nvim-lspconfig-1a6dab943c2e4639d689f71f21a62a856ef70b3c.tar.xz
nvim-lspconfig-1a6dab943c2e4639d689f71f21a62a856ef70b3c.tar.zst
nvim-lspconfig-1a6dab943c2e4639d689f71f21a62a856ef70b3c.zip
Remove need for JuliaProject.toml
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp/JuliaProject.toml10
-rw-r--r--lua/nvim_lsp/julials.lua12
2 files changed, 7 insertions, 15 deletions
diff --git a/lua/nvim_lsp/JuliaProject.toml b/lua/nvim_lsp/JuliaProject.toml
deleted file mode 100644
index 300d526c..00000000
--- a/lua/nvim_lsp/JuliaProject.toml
+++ /dev/null
@@ -1,10 +0,0 @@
-[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 14569aa1..55ace9c0 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'
-current_directory = debug.getinfo(1).short_src:match("(.*[/\\])")
+environment_directory = util.path.join(util.base_install_dir, "julials")
configs.julials = {
default_config = {
cmd = {
- "julia", "--project=" .. current_directory, "--startup-file=no", "--history-file=no", "-e", [[
+ "julia", "--project=" .. environment_directory, "--startup-file=no", "--history-file=no", "-e", [[
using Pkg;
Pkg.instantiate()
using LanguageServer; using SymbolServer;
@@ -32,15 +32,17 @@ 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 --project=/path/to/nvim_lsp/lua/nvim_lsp -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
+julia --project=~/.cache/nvim/nvim_lsp/julials -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
```
]];
};
}
configs.julials.install = function()
+
local script = [[
- julia --project=]] .. current_directory .. [[ -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
+ julia -e 'mkdir(]] .. environment_directory .. [[)'
+ julia --project=]] .. environment_directory .. [[ -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
]]
util.sh(script, vim.loop.os_homedir())
@@ -48,7 +50,7 @@ end
configs.julials.install_info = function()
local script = [[
- julia --project=]] .. current_directory .. [[ -e 'using LanguageServer; using SymbolServer'
+ julia --project=]] .. environment_directory .. [[ -e 'using LanguageServer; using SymbolServer'
]]
local status = pcall(vim.fn.system, script)