Rename from tiny-debugger to turbo-debug — inspired by Turbo Pascal, the first IDE with a real visual debugger. This thing isn't tiny, it's turbo charged. CHANGELOG for 0.1.0: Features: - Zero-config debugging — one line install, everything works - Modal keybindings (c/s/d/r/q/x/X/D/W/K/E/R/?), active only during debug mode, cleanly removed on exit - Persistent breakpoints via persistent-breakpoints.nvim - Inline virtual text — variable values in source code - Hover (K), watch (W), REPL eval (E) from the code window - Help splash (3s auto-dismiss) + manual help (?) - Debug mode chrome — winbar indicator, cursor highlight - dapui integration — controls toolbar, labeled panels - which-key support — <leader>d debug group auto-registered - quit_exits_mode option Adapters (12 languages): - Python (debugpy + venv detection) - Rust (codelldb + cargo build + vim.ui.select picker) - Go (delve), C/C++/Swift (codelldb) - JavaScript/TypeScript (js-debug-adapter) - C# (netcoredbg), Java, Kotlin, PHP, Ruby, Lua (osv) Keybindings: - <leader>dd — toggle debug mode - <leader>dx / <leader>dX / <leader>dD — breakpoints (always) - c s d r C x X D W K E q R ? — modal (debug mode only)
22 lines
755 B
Lua
22 lines
755 B
Lua
local assert_eq = require("helpers").assert_eq
|
|
local td = require("turbo-debug")
|
|
|
|
-- set a custom mapping for 'c'
|
|
vim.keymap.set("n", "c", function() end, { buffer = 0, desc = "custom c" })
|
|
|
|
-- verify custom mapping exists
|
|
local maparg = vim.fn.maparg("c", "n", false, true)
|
|
assert_eq(maparg.desc, "custom c", "custom mapping exists before enter")
|
|
|
|
-- enter debug mode — should override 'c'
|
|
td.toggle()
|
|
maparg = vim.fn.maparg("c", "n", false, true)
|
|
assert_eq(maparg.desc, "turbo-debug: continue", "c overridden in debug mode")
|
|
|
|
-- exit debug mode — should restore custom 'c'
|
|
td.toggle()
|
|
maparg = vim.fn.maparg("c", "n", false, true)
|
|
assert_eq(maparg.desc, "custom c", "custom mapping restored after exit")
|
|
|
|
print("ALL KEY STASH/RESTORE TESTS PASSED")
|