aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-08 15:05:34 +0200
committerGitHub <noreply@github.com>2022-07-08 13:05:34 +0000
commit154bbe0422f4c809a1f6cba560921f6821550e89 (patch)
treeef7392d619c39b54329a799783759929a2405f44 /lua
parentfix(firefox-debug-adapter): remove unnecessary git diff header (#17) (diff)
downloadmason-154bbe0422f4c809a1f6cba560921f6821550e89.tar
mason-154bbe0422f4c809a1f6cba560921f6821550e89.tar.gz
mason-154bbe0422f4c809a1f6cba560921f6821550e89.tar.bz2
mason-154bbe0422f4c809a1f6cba560921f6821550e89.tar.lz
mason-154bbe0422f4c809a1f6cba560921f6821550e89.tar.xz
mason-154bbe0422f4c809a1f6cba560921f6821550e89.tar.zst
mason-154bbe0422f4c809a1f6cba560921f6821550e89.zip
feat: add php-debug-adapter (#18)
Diffstat (limited to 'lua')
-rw-r--r--lua/mason/_generated/package_index.lua1
-rw-r--r--lua/mason/packages/php-debug-adapter/init.lua25
2 files changed, 26 insertions, 0 deletions
diff --git a/lua/mason/_generated/package_index.lua b/lua/mason/_generated/package_index.lua
index 939e3597..9c2642db 100644
--- a/lua/mason/_generated/package_index.lua
+++ b/lua/mason/_generated/package_index.lua
@@ -81,6 +81,7 @@ return {
["omnisharp-roslyn"] = "mason.packages.omnisharp-roslyn",
["opencl-language-server"] = "mason.packages.opencl-language-server",
perlnavigator = "mason.packages.perlnavigator",
+ ["php-debug-adapter"] = "mason.packages.php-debug-adapter",
phpactor = "mason.packages.phpactor",
["powershell-editor-services"] = "mason.packages.powershell-editor-services",
["prisma-language-server"] = "mason.packages.prisma-language-server",
diff --git a/lua/mason/packages/php-debug-adapter/init.lua b/lua/mason/packages/php-debug-adapter/init.lua
new file mode 100644
index 00000000..421c0938
--- /dev/null
+++ b/lua/mason/packages/php-debug-adapter/init.lua
@@ -0,0 +1,25 @@
+local Pkg = require "mason.core.package"
+local github = require "mason.core.managers.github"
+local _ = require "mason.core.functional"
+local path = require "mason.core.path"
+
+return Pkg.new {
+ name = "php-debug-adapter",
+ desc = [[PHP Debug Adapter for Visual Studio Code 🐞⛔]],
+ homepage = "https://github.com/xdebug/vscode-php-debug",
+ languages = { Pkg.Lang.PHP },
+ categories = { Pkg.Cat.DAP },
+ ---@async
+ ---@param ctx InstallContext
+ install = function(ctx)
+ github
+ .unzip_release_file({
+ repo = "xdebug/vscode-php-debug",
+ asset_file = _.compose(_.format "php-debug-%s.vsix", _.gsub("^v", "")),
+ })
+ .with_receipt()
+ ctx.fs:rmrf(path.concat { "extension", "images" })
+ ctx:write_node_exec_wrapper("php-debug-adapter", path.concat { "extension", "out", "phpDebug.js" })
+ ctx:link_bin("php-debug-adapter", "php-debug-adapter")
+ end,
+}