diff options
Diffstat (limited to 'lua/mason-registry/index/groovy-language-server/init.lua')
| -rw-r--r-- | lua/mason-registry/index/groovy-language-server/init.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lua/mason-registry/index/groovy-language-server/init.lua b/lua/mason-registry/index/groovy-language-server/init.lua new file mode 100644 index 00000000..1470c7a4 --- /dev/null +++ b/lua/mason-registry/index/groovy-language-server/init.lua @@ -0,0 +1,33 @@ +local Pkg = require "mason-core.package" +local std = require "mason-core.managers.std" +local git = require "mason-core.managers.git" +local path = require "mason-core.path" + +return Pkg.new { + name = "groovy-language-server", + desc = [[A language server for Groovy]], + homepage = "https://github.com/GroovyLanguageServer/groovy-language-server", + languages = { Pkg.Lang.Groovy }, + categories = { Pkg.Cat.LSP }, + ---@async + ---@param ctx InstallContext + install = function(ctx) + std.ensure_executable "javac" + git.clone({ "https://github.com/GroovyLanguageServer/groovy-language-server" }).with_receipt() + ctx:promote_cwd() + ctx.spawn.gradlew { + "build", + with_paths = { ctx.cwd:get() }, + } + + ctx:link_bin( + "groovy-language-server", + ctx:write_shell_exec_wrapper( + "groovy-language-server", + ("java -jar %q"):format( + path.concat { ctx.package:get_install_path(), "build", "libs", "groovy-language-server-all.jar" } + ) + ) + ) + end, +} |
