summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/_lspinstall
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2021-04-19 21:45:03 +0200
committeraktersnurra <grydholm@kth.se>2021-04-19 21:45:03 +0200
commit69347ce034f8966579e72dc969ec808363fdfaeb (patch)
tree3be9e1b1547a0871826b6112a0d88406572b02ba /.config/nvim/lua/_lspinstall
parent23b895222a16925d39d04d45dedbedec9db0c752 (diff)
Add missing files of nvim conf
Diffstat (limited to '.config/nvim/lua/_lspinstall')
-rw-r--r--.config/nvim/lua/_lspinstall/init.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/.config/nvim/lua/_lspinstall/init.lua b/.config/nvim/lua/_lspinstall/init.lua
new file mode 100644
index 0000000..34a9fe6
--- /dev/null
+++ b/.config/nvim/lua/_lspinstall/init.lua
@@ -0,0 +1,27 @@
+-- 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/servers'.kotlin = vim.tbl_extend('error', config, {
+ install_script = [[
+ git clone https://github.com/fwcd/kotlin-language-server.git language-server
+ cd language-server
+ ./gradlew :server:installDist
+ ]],
+ uninstall_script = nil -- can be omitted
+})
+
+require'lspinstall'.setup()