feat: add 10 new language adapters
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.
This commit is contained in:
8 files changed
+240
-13
No files matched your search
@@ -0,0 +1,39 @@
|
||||
local loader = require("turbo-debug.adapters.init")
|
||||
|
||||
local M = {}
|
||||
|
||||
-- vscDebugger is an R package, not a standalone binary. It must be installed
|
||||
-- in the user's R library (install.packages("vscDebugger") or remotes::install_github).
|
||||
-- Silently skip registration if it's missing — matches the "no noise when
|
||||
-- prereqs missing" invariant used by the other adapters.
|
||||
local function has_vsc_debugger()
|
||||
if vim.fn.executable("Rscript") ~= 1 then return false end
|
||||
vim.fn.system({
|
||||
"Rscript",
|
||||
"-e",
|
||||
"if (!requireNamespace('vscDebugger', quietly=TRUE)) quit(status=1)",
|
||||
})
|
||||
return vim.v.shell_error == 0
|
||||
end
|
||||
|
||||
function M.register(dap)
|
||||
local R = loader.find_executable({ "R" })
|
||||
if not R then return end
|
||||
if not has_vsc_debugger() then return end
|
||||
|
||||
loader.register(dap, "r", {
|
||||
type = "executable",
|
||||
command = R,
|
||||
args = { "-e", "vscDebugger::.vsc.listenForDAP()" },
|
||||
}, {
|
||||
{
|
||||
type = "r",
|
||||
request = "launch",
|
||||
name = "Launch R file",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}, { "r", "rmd" })
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in new issue
Block a user