1
0

Add dap plugins

This commit is contained in:
Patrick Auernig 2023-10-19 19:16:00 +02:00
parent 4485d12309
commit 13e1004eb4
5 changed files with 99 additions and 0 deletions

View File

@ -18,10 +18,13 @@
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"lualine.nvim": { "branch": "master", "commit": "1a3f6bba410aff5a51bf8c84287aaa3a8ba30d0d" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e7b64c11035aa924f87385b72145e0ccf68a7e0a" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "f0cd12f7a8a310c58cecebddb6b219ffad1cfd0f" },
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
"neogit": { "branch": "master", "commit": "eb9d6b8f0840e4f2fa775bca7ec4a5df8b42ed6d" },
"nvim-autopairs": { "branch": "master", "commit": "f6c71641f6f183427a651c0ce4ba3fb89404fa9e" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-dap": { "branch": "master", "commit": "92dc531eea2c9a3ef504a5c8ac0decd1fa59a6a3" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-lspconfig": { "branch": "master", "commit": "e49b1e90c1781ce372013de3fa93a91ea29fc34a" },
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
"nvim-tree.lua": { "branch": "master", "commit": "40b9b887d090d5da89a84689b4ca0304a9649f62" },

View File

@ -57,5 +57,6 @@ require("lazy").setup({
spec = {
{ import = "valeth.plugins" },
{ import = "valeth.plugins.lsp" },
{ import = "valeth.plugins.dap" },
}
})

View File

@ -0,0 +1,7 @@
local spec = {
"mfussenegger/nvim-dap",
tag = "0.6.0",
lazy = true,
}
return spec

View File

@ -0,0 +1,18 @@
local spec = {
"jay-babu/mason-nvim-dap.nvim",
tag = "v2.2.0",
}
spec.opts = {
ensure_installed = { "codelldb" },
handlers = {},
}
spec.dependencies = {
"williamboman/mason.nvim",
"mfussenegger/nvim-dap",
}
spec.ft = { "rust" }
return spec

View File

@ -0,0 +1,70 @@
local spec = {
"rcarriga/nvim-dap-ui",
tag = "v3.9.1"
}
spec.dependencies = {
"mfussenegger/nvim-dap",
}
spec.keys = {
{ "<Leader>dbg", "<cmd>DapContinue<CR>"},
{ "<Leader>dbr", "<cmd>DapToggleBreakpoint<CR>" },
{ "<Leader>dso", "<cmd>DapStepOver<CR>" },
{ "<Leader>dq", "<cmd>DapTerminate<CR>" },
}
spec.config = function()
local dap = require("dap")
local dap_ui = require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function()
dap_ui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dap_ui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dap_ui.close()
end
local side = {
position = "right",
size = 40, -- columns
elements = {
{
id = "stacks",
size = 0.5,
},
{
id = "breakpoints",
size = 0.5,
}
},
}
local bottom = {
position = "bottom",
size = 10, -- rows
elements = {
{
id = "scopes",
size = 0.5,
},
{
id = "repl",
size = 0.5,
}
},
}
local opts = {
layouts = { side, bottom },
}
dap_ui.setup(opts)
end
return spec