Files
dotfiles/.config/nvim/lua/plugins/debugging.lua
fbachus 8a676a19c1 add paru config and ignore lock files
only minor tinkering otherwise
2026-01-23 01:59:35 +01:00

83 lines
1.7 KiB
Lua

return {
{
"mfussenegger/nvim-dap",
lazy = true,
keys = {
{
"<leader>db",
function() require("dap").toggle_breakpoint() end,
desc = "Toggle Breakpoint",
},
{
"<leader>dc",
function() require("dap").continue() end,
desc = "Continue",
},
{
"<leader>dC",
function() require("dap").run_to_cursor() end,
desc = "Run to Cursor",
},
{
"<leader>dT",
function() require("dap").terminate() end,
desc = "Terminate",
},
},
},
{
"rcarriga/nvim-dap-ui",
config = true,
lazy = true,
keys = {
{
"<leader>du",
function() require("dapui").toggle({}) end,
desc = "Dap UI",
},
},
dependencies = {
"jay-babu/mason-nvim-dap.nvim",
"leoluz/nvim-dap-go",
"mfussenegger/nvim-dap-python",
"nvim-neotest/nvim-nio",
"theHamsta/nvim-dap-virtual-text",
},
},
-- debugging virtual text to show output
-- {
-- "theHamsta/nvim-dap-virtual-text",
-- event = "VeryLazy",
-- config = true,
-- dependencies = {
-- "mfussenegger/nvim-dap",
-- },
-- },
-- debugging languages
{
-- Automatically sets up LSP, so lsp.lua doesn't include rust.
-- Makes debugging work seamlessly.
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended by module.
lazy = true,
ft = "rust",
dependencies = {
"mfussenegger/nvim-dap",
},
},
{
"mfussenegger/nvim-dap-python",
lazy = true,
ft = "python",
config = function()
local python = vim.fn.expand("~/.local/share/nvim/mason/packages/debugpy/venv/bin/python")
require("dap-python").setup(python)
end,
-- Consider the mappings at
-- https://github.com/mfussenegger/nvim-dap-python?tab=readme-ov-file#mappings
dependencies = {
"mfussenegger/nvim-dap",
},
},
}