aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp
diff options
context:
space:
mode:
authorTormod Alf Try Tufteland <tormodat.tufteland@eika.no>2020-12-11 13:31:16 +0100
committerTormod Alf Try Tufteland <tormodat.tufteland@eika.no>2020-12-11 13:31:16 +0100
commit7f50970e1ceed92554e8f37c142dbf04878496d7 (patch)
tree5615af5c3da14e416be4abcbc14d3edb77455e5c /lua/nvim_lsp
parentMerge pull request #355 from wuilliam321/groovyls-support (diff)
downloadnvim-lspconfig-7f50970e1ceed92554e8f37c142dbf04878496d7.tar
nvim-lspconfig-7f50970e1ceed92554e8f37c142dbf04878496d7.tar.gz
nvim-lspconfig-7f50970e1ceed92554e8f37c142dbf04878496d7.tar.bz2
nvim-lspconfig-7f50970e1ceed92554e8f37c142dbf04878496d7.tar.lz
nvim-lspconfig-7f50970e1ceed92554e8f37c142dbf04878496d7.tar.xz
nvim-lspconfig-7f50970e1ceed92554e8f37c142dbf04878496d7.tar.zst
nvim-lspconfig-7f50970e1ceed92554e8f37c142dbf04878496d7.zip
groovyls: nvim_lsp -> lspconfig
Diffstat (limited to 'lua/nvim_lsp')
-rw-r--r--lua/nvim_lsp/groovyls.lua109
1 files changed, 0 insertions, 109 deletions
diff --git a/lua/nvim_lsp/groovyls.lua b/lua/nvim_lsp/groovyls.lua
deleted file mode 100644
index f65c2c70..00000000
--- a/lua/nvim_lsp/groovyls.lua
+++ /dev/null
@@ -1,109 +0,0 @@
-local configs = require 'nvim_lsp/configs'
-local util = require 'nvim_lsp/util'
-
-local name = "groovyls"
-local bin_name = "groovy-language-server-all.jar"
-
-local function make_installer()
- local X = {}
- local P = util.path.join
- local install_dir = P{util.base_install_dir, name}
- local bin_path = P{install_dir, "groovy-language-server", "build", "libs", bin_name}
- local cmd = {
- "java", "-jar", bin_path,
- };
-
- function X.install()
- local install_info = X.info()
- if install_info.is_installed then
- print(name, "is already installed.")
- return
- end
- if not (util.has_bins("curl")) then
- error('Need "curl" to install this.')
- return
- end
- if not (util.has_bins("java")) then
- error('Need "Java 11+" to install this.')
- return
- end
-
- local script = [=[
-set -e
-# clone project
-git clone https://github.com/prominic/groovy-language-server.git
-cd groovy-language-server
-
-# build
-./gradlew build
- ]=]
- vim.fn.mkdir(install_info.install_dir, "p")
- util.sh(script, install_info.install_dir)
- end
-
- function X.info()
- return {
- is_installed = util.path.exists(bin_path);
- install_dir = install_dir;
- cmd = cmd
- }
- end
-
- function X.configure(config)
- local install_info = X.info()
- if install_info.is_installed then
- config.cmd = install_info.cmd
- end
- end
- return X
-end
-
-local installer = make_installer()
-
-configs[name] = {
- default_config = {
- cmd = {
- "java", "-jar", bin_name
- },
- filetypes = {"groovy"};
- root_dir = util.root_pattern(".git") or vim.loop.os_homedir();
- };
- on_new_config = function(config)
- installer.configure(config)
- end;
- docs = {
- description = [[
-https://github.com/prominic/groovy-language-server.git
-
-Requirements:
- - Linux only (for now)
- - Java 11+
-
-`groovyls` can be installed via `:LspInstall groovyls` or by yourself by following the instructions [here](https://github.com/prominic/groovy-language-server.git#build).
-
-The command `:LspInstaller groovyls` makes an attempt at installing the binary by
-Fetching the groovyls repository from GitHub, compiling it and then expose a binary.
-
-If you installed groovy language server by yourself, you can set the `cmd` custom path as follow:
-
-```lua
-require'nvim_lsp'.groovyls.setup{
- -- Unix
- cmd = { "java", "-jar", "path/to/groovyls/groovy-language-server-all.jar" },
- ...
-}
-```
-]];
- default_config = {
- cmd = {
- "java", "-jar", bin_name
- },
- filetypes = {"groovy"};
- root_dir = [[root_pattern(".git") or vim.loop.os_homedir()]];
- };
- };
-}
-
-configs[name].install = installer.install
-configs[name].install_info = installer.info
--- vim:et ts=2 sw=2