summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lsp/lua-ls.lua1
-rw-r--r--lua/nv-lspinstall/init.lua18
2 files changed, 18 insertions, 1 deletions
diff --git a/lua/lsp/lua-ls.lua b/lua/lsp/lua-ls.lua
index 5a5dae57..36df2b49 100644
--- a/lua/lsp/lua-ls.lua
+++ b/lua/lsp/lua-ls.lua
@@ -1,5 +1,4 @@
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
--- USER = vim.fn.expand('$USER')
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
diff --git a/lua/nv-lspinstall/init.lua b/lua/nv-lspinstall/init.lua
new file mode 100644
index 00000000..2b6e0edb
--- /dev/null
+++ b/lua/nv-lspinstall/init.lua
@@ -0,0 +1,18 @@
+-- 1. get the config for this server from nvim-lspconfig and adjust the cmd path.
+-- relative paths are allowed, lspinstall automatically adjusts the cmd and cmd_cwd for us!
+local config = require'lspconfig'.jdtls.document_config
+require'lspconfig/configs'.jdtls = nil -- important, unset the loaded config again
+-- config.default_config.cmd[1] = "./node_modules/.bin/bash-language-server"
+
+-- 2. extend the config with an install_script and (optionally) uninstall_script
+require'lspinstall/servers'.jdtls = vim.tbl_extend('error', config, {
+ -- lspinstall will automatically create/delete the install directory for every server
+ install_script = [[
+ git clone https://github.com/eclipse/eclipse.jdt.ls.git
+ cd eclipse.jdt.ls
+ ./mvnw clean verify
+ ]],
+ uninstall_script = nil -- can be omitted
+})
+
+require'lspinstall'.setup()