-
-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(registry): add drools-lsp (#898)
- Loading branch information
1 parent
01cba2a
commit dd61453
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
local Pkg = require "mason-core.package" | ||
local github = require "mason-core.managers.github" | ||
local Optional = require "mason-core.optional" | ||
local path = require "mason-core.path" | ||
|
||
return Pkg.new { | ||
name = "drools-lsp", | ||
desc = [[An implementation of a language server for the Drools Rule Language.]], | ||
homepage = "https://github.com/kiegroup/drools-lsp", | ||
languages = { Pkg.Lang.Drools }, | ||
categories = { Pkg.Cat.LSP }, | ||
---@async | ||
---@param ctx InstallContext | ||
install = function(ctx) | ||
local jar = "drools-lsp-server-jar-with-dependencies.jar" | ||
github | ||
.download_release_file({ | ||
repo = "kiegroup/drools-lsp", | ||
version = Optional.of "latest", | ||
asset_file = jar, | ||
out_file = jar, | ||
}) | ||
.with_receipt() | ||
ctx:link_bin( | ||
"drools-lsp", | ||
ctx:write_shell_exec_wrapper( | ||
"drools-lsp", | ||
("java -cp %q org.drools.lsp.server.Main"):format(path.concat { ctx.package:get_install_path(), jar }) | ||
) | ||
) | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters