aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/groovyls.lua
blob: 329fb36a6bdc6374198f05288177a43b35bfeda0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
local configs = require "lspconfig/configs"
local util = require "lspconfig/util"

local name = "groovyls"
local bin_name = "groovy-language-server-all.jar"

configs[name] = {
  default_config = {
    cmd = {
      "java",
      "-jar",
      bin_name,
    },
    filetypes = { "groovy" },
    root_dir = util.root_pattern ".git" or vim.loop.os_homedir(),
  },
  docs = {
    description = [[
https://github.com/prominic/groovy-language-server.git

Requirements:
 - Linux/macOS (for now)
 - Java 11+

`groovyls` can be installed by following the instructions [here](https://github.com/prominic/groovy-language-server.git#build).

If you have installed groovy language server, you can set the `cmd` custom path as follow:

```lua
require'lspconfig'.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()]],
    },
  },
}

-- vim:et ts=2 sw=2