diff options
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | installer/install-groovy-language-server.sh | 21 | ||||
-rw-r--r-- | settings.json | 8 | ||||
-rw-r--r-- | settings/groovy-language-server.vim | 13 |
4 files changed, 43 insertions, 0 deletions
@@ -93,6 +93,7 @@ Currently, no way to uninstall/update server. Run this command again, newer vers | Nim | nimls | No | | D | dls | No | | Elixir | elixir-ls | Yes | +| Groovy | groovy-language-server | Yes | ## License diff --git a/installer/install-groovy-language-server.sh b/installer/install-groovy-language-server.sh new file mode 100755 index 0000000..6b33f55 --- /dev/null +++ b/installer/install-groovy-language-server.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +cd $(dirname $0) + +server_dir="../servers/groovy-language-server" +[ -d $server_dir ] && rm -rf $server_dir +mkdir $server_dir && cd $server_dir + +git clone --depth=1 https://github.com/prominic/groovy-language-server . +./gradlew build + +cat <<EOF >groovy-language-server +#!/bin/sh + +DIR=\$(cd \$(dirname \$0); pwd) +java -jar \$DIR/build/libs/groovy-language-server-all.jar +EOF + +chmod +x groovy-language-server diff --git a/settings.json b/settings.json index 7f91f20..8aa0710 100644 --- a/settings.json +++ b/settings.json @@ -291,6 +291,14 @@ ] } ], + "groovy": [ + { + "command": "groovy-language-server", + "requires": [ + "java" + ] + } + ], "yaml": [ { "command": "yaml-language-server", diff --git a/settings/groovy-language-server.vim b/settings/groovy-language-server.vim new file mode 100644 index 0000000..8b1a2bc --- /dev/null +++ b/settings/groovy-language-server.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_groovy_language_server + au! + LspRegisterServer { + \ 'name': 'groovy-language-server', + \ 'cmd': {server_info->lsp_settings#get('groovy-language-server', 'cmd', [lsp_settings#exec_path('groovy-language-server')])}, + \ 'root_uri':{server_info->lsp_settings#get('groovy-language-server', 'root_uri', lsp_settings#root_uri(['.git/', 'build.gradle']))}, + \ 'initialization_options': lsp_settings#get('groovy-language-server', 'initialization_options', {}), + \ 'whitelist': lsp_settings#get('groovy-language-server', 'whitelist', ['groovy']), + \ 'blacklist': lsp_settings#get('groovy-language-server', 'blacklist', []), + \ 'config': lsp_settings#get('groovy-language-server', 'config', {}), + \ 'workspace_config': lsp_settings#get('groovy-language-server', 'workspace_config', {}), + \ } +augroup END |