aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/julials.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/julials.lua')
-rw-r--r--lua/lspconfig/julials.lua29
1 files changed, 15 insertions, 14 deletions
diff --git a/lua/lspconfig/julials.lua b/lua/lspconfig/julials.lua
index e10c282b..d6cc351c 100644
--- a/lua/lspconfig/julials.lua
+++ b/lua/lspconfig/julials.lua
@@ -1,11 +1,12 @@
-local configs = require 'lspconfig/configs'
-local util = require 'lspconfig/util'
+local configs = require "lspconfig/configs"
+local util = require "lspconfig/util"
local cmd = {
"julia",
"--startup-file=no",
"--history-file=no",
- "-e", [[
+ "-e",
+ [[
using Pkg;
Pkg.instantiate()
using LanguageServer; using SymbolServer;
@@ -16,25 +17,25 @@ local cmd = {
server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path);
server.runlinter = true;
run(server);
- ]]
-};
+ ]],
+}
configs.julials = {
default_config = {
- cmd = cmd;
+ cmd = cmd,
on_new_config = function(new_config, _)
- local server_path = vim.fn.system("julia --startup-file=no -q -e 'print(Base.find_package(\"LanguageServer\"))'")
+ local server_path = vim.fn.system "julia --startup-file=no -q -e 'print(Base.find_package(\"LanguageServer\"))'"
local new_cmd = vim.deepcopy(cmd)
- table.insert(new_cmd, 2, "--project="..server_path:sub(0,-19))
+ table.insert(new_cmd, 2, "--project=" .. server_path:sub(0, -19))
new_config.cmd = new_cmd
end,
- filetypes = {'julia'};
+ filetypes = { "julia" },
root_dir = function(fname)
return util.find_git_ancestor(fname) or vim.fn.getcwd()
- end;
- };
+ end,
+ },
docs = {
- package_json = "https://raw.githubusercontent.com/julia-vscode/julia-vscode/master/package.json";
+ package_json = "https://raw.githubusercontent.com/julia-vscode/julia-vscode/master/package.json",
description = [[
https://github.com/julia-vscode/julia-vscode
@@ -80,8 +81,8 @@ julia -e 'print(Base.find_package("LanguageServer"))'
Note: the directory passed to `--project=...` should terminate with src, not LanguageServer.jl.
- ]];
- };
+ ]],
+ },
}
--- vim:et ts=2 sw=2