Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(registry): add drools-lsp #898

Merged
merged 2 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions lua/mason-registry/drools-lsp/init.lua
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,
}
1 change: 1 addition & 0 deletions lua/mason-registry/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ return {
["dockerfile-language-server"] = "mason-registry.dockerfile-language-server",
["dot-language-server"] = "mason-registry.dot-language-server",
dprint = "mason-registry.dprint",
["drools-lsp"] = "mason-registry.drools-lsp",
["editorconfig-checker"] = "mason-registry.editorconfig-checker",
efm = "mason-registry.efm",
["elixir-ls"] = "mason-registry.elixir-ls",
Expand Down
1 change: 1 addition & 0 deletions lua/mason/mappings/language.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ return {
django = { "curlylint", "djlint" },
dockerfile = { "dockerfile-language-server", "hadolint" },
dot = { "dot-language-server" },
drools = { "drools-lsp" },
elixir = { "elixir-ls" },
elm = { "elm-format", "elm-language-server" },
ember = { "ember-language-server" },
Expand Down