1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-04 02:30:04 +08:00
SpaceVim/bundle/nvim-lspconfig/lua/lspconfig/server_configurations/groovyls.lua

37 lines
837 B
Lua
Raw Normal View History

local util = require 'lspconfig.util'
2021-10-05 15:13:10 +08:00
return {
2021-10-05 15:13:10 +08:00
default_config = {
cmd = {
'java',
'-jar',
'groovy-language-server-all.jar',
2021-10-05 15:13:10 +08:00
},
filetypes = { 'groovy' },
root_dir = function(fname)
return util.root_pattern 'Jenkinsfile'(fname) or util.find_git_ancestor(fname)
end,
2021-10-05 15:13:10 +08:00
},
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" },
...
}
```
]],
},
}