Skip to content

Commit

Permalink
feat: add kotlin-debug-adapter package (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau authored Dec 12, 2022
1 parent e8bf531 commit a13c298
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/mason-registry/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ return {
jsonlint = "mason-registry.jsonlint",
["jsonnet-language-server"] = "mason-registry.jsonnet-language-server",
["julia-lsp"] = "mason-registry.julia-lsp",
["kotlin-debug-adapter"] = "mason-registry.kotlin-debug-adapter",
["kotlin-language-server"] = "mason-registry.kotlin-language-server",
ktlint = "mason-registry.ktlint",
lelwel = "mason-registry.lelwel",
Expand Down
30 changes: 30 additions & 0 deletions lua/mason-registry/kotlin-debug-adapter/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local Pkg = require "mason-core.package"
local github = require "mason-core.managers.github"
local platform = require "mason-core.platform"
local path = require "mason-core.path"

return Pkg.new {
name = "kotlin-debug-adapter",
desc = [[Kotlin/JVM debugging for any editor/IDE using the Debug Adapter Protocol]],
homepage = "https://github.com/fwcd/kotlin-debug-adapter",
languages = { Pkg.Lang.Kotlin },
categories = { Pkg.Cat.DAP },
---@async
---@param ctx InstallContext
install = function(ctx)
github
.unzip_release_file({
repo = "fwcd/kotlin-debug-adapter",
asset_file = "adapter.zip",
})
.with_receipt()
ctx:link_bin(
"kotlin-debug-adapter",
path.concat {
"adapter",
"bin",
platform.is.win and "kotlin-debug-adapter.bat" or "kotlin-debug-adapter",
}
)
end,
}
2 changes: 1 addition & 1 deletion lua/mason/mappings/language.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ return {
jsonnet = { "jsonnet-language-server" },
jsx = { "prettier", "prettierd" },
julia = { "julia-lsp" },
kotlin = { "kotlin-language-server", "ktlint" },
kotlin = { "kotlin-debug-adapter", "kotlin-language-server", "ktlint" },
ksh = { "beautysh" },
latex = { "ltex-ls", "tectonic", "texlab", "vale" },
lelwel = { "lelwel" },
Expand Down

0 comments on commit a13c298

Please sign in to comment.