adapters: php, ruby, lua

This commit is contained in:
swaits committed 2026-04-11 16:43:04 -06:00
1 parent ff4eefea6c
commit a74469968a
3 files changed
+80 -3

No files matched your search

+25 -1
View File
@@ -1 +1,25 @@
return {}
local loader = require("tiny-debugger.adapters.init")
local M = {}
function M.register(dap)
-- osv (one-small-step-for-vimkind) is optional — skip gracefully if not installed
local ok, osv = pcall(require, "osv")
if not ok then return end
loader.register(dap, "nlua", {
type = "server",
host = "127.0.0.1",
port = function()
return osv.launch({ port = 0 })
end,
}, {
{
type = "nlua",
request = "attach",
name = "Attach to running Neovim",
},
}, { "lua" })
end
return M
+22 -1
View File
@@ -1 +1,22 @@
return {}
local loader = require("tiny-debugger.adapters.init")
local M = {}
function M.register(dap)
local php_debug = loader.find_executable({ "php-debug-adapter" })
if not php_debug then return end
loader.register(dap, "php", {
type = "executable",
command = php_debug,
}, {
{
type = "php",
request = "launch",
name = "Listen for Xdebug",
port = 9003,
},
}, { "php" })
end
return M
+33 -1
View File
@@ -1 +1,33 @@
return {}
local loader = require("tiny-debugger.adapters.init")
local M = {}
function M.register(dap)
local rdbg = loader.find_executable({ "rdbg" })
if not rdbg then return end
loader.register(dap, "rdbg", {
type = "server",
port = "${port}",
executable = {
command = rdbg,
args = { "-n", "--open", "--port", "${port}", "-c", "--", "ruby", "${file}" },
},
}, {
{
type = "rdbg",
request = "launch",
name = "Launch file",
command = "ruby",
script = "${file}",
},
{
type = "rdbg",
request = "attach",
name = "Attach",
localfsMap = "${workspaceFolder}",
},
}, { "ruby" })
end
return M