Adds Dart (with optional Flutter auto-detection), Bash (bash-debug-adapter with mason bashdb_dir probing), R (vscDebugger package preflight), Elixir (mix_task), Haskell, OCaml (ocamlearlybird), Zig/Nim/Crystal (via codelldb filetype extension), and F# (via netcoredbg filetype extension). Expands built-in adapter coverage from 12 to 22 languages.
40 lines
1011 B
Lua
40 lines
1011 B
Lua
local loader = require("turbo-debug.adapters.init")
|
|
|
|
local M = {}
|
|
|
|
function M.register(dap)
|
|
local exe = loader.find_executable({ "bash-debug-adapter" })
|
|
if not exe then return end
|
|
|
|
local bashdb_dir = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/extension/bashdb_dir"
|
|
if vim.fn.isdirectory(bashdb_dir) == 0 then bashdb_dir = nil end
|
|
|
|
loader.register(dap, "bashdb", {
|
|
type = "executable",
|
|
command = exe,
|
|
name = "bashdb",
|
|
}, {
|
|
{
|
|
type = "bashdb",
|
|
request = "launch",
|
|
name = "Launch file",
|
|
showDebugOutput = true,
|
|
pathBashdb = bashdb_dir and (bashdb_dir .. "/bashdb") or "bashdb",
|
|
pathBashdbLib = bashdb_dir,
|
|
trace = true,
|
|
file = "${file}",
|
|
program = "${file}",
|
|
cwd = "${workspaceFolder}",
|
|
pathCat = "cat",
|
|
pathBash = "/bin/bash",
|
|
pathMkfifo = "mkfifo",
|
|
pathPkill = "pkill",
|
|
args = {},
|
|
env = {},
|
|
terminalKind = "integrated",
|
|
},
|
|
}, { "sh", "bash" })
|
|
end
|
|
|
|
return M
|