diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-07-03 14:45:08 -0700 |
|---|---|---|
| committer | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-07-03 15:49:27 -0700 |
| commit | ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c (patch) | |
| tree | 77d533dc9606ca7e9b30d1a96baebf3de325d2a8 /lua/lspconfig/julials.lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.gz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.bz2 nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.lz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.xz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.zst nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.zip | |
ci: lint and format with stylua
Diffstat (limited to 'lua/lspconfig/julials.lua')
| -rw-r--r-- | lua/lspconfig/julials.lua | 29 |
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 |
