mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-30 04:24:26 +02:00
update debug
This commit is contained in:
parent
d0298906e6
commit
e42d5cbc43
5 changed files with 61 additions and 2 deletions
|
@ -362,4 +362,25 @@ return {
|
|||
ft = { "markdown" },
|
||||
cmd = { "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle" },
|
||||
},
|
||||
-- Start Debuger
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
enabled = vim.fn.has("win32") == 1,
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
enabled = vim.fn.has("win32") == 1,
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
require("user.dapui")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jayp0521/mason-nvim-dap.nvim",
|
||||
enabled = vim.fn.has("win32") == 1,
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
require("user.mason-nvim-dap")
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
11
lua/user/dapui.lua
Normal file
11
lua/user/dapui.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
local dap, dapui = require("dap"), require("dapui")
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dapui.setup("plugins.dapui", { floating = { border = "rounded" } })
|
3
lua/user/mason-nvim-dap.lua
Normal file
3
lua/user/mason-nvim-dap.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
local mason_nvim_dap = require("mason-nvim-dap")
|
||||
mason_nvim_dap.setup("plugins.mason-nvim-dap", { automatic_setup = true })
|
||||
mason_nvim_dap.setup_handlers("mason-nvim-dap.setup_handlers", {})
|
|
@ -226,6 +226,27 @@ local mappings = {
|
|||
"Run MVN",
|
||||
},
|
||||
},
|
||||
D = {
|
||||
name = "Debug",
|
||||
b = {
|
||||
function()
|
||||
require("dap").toggle_breakpoint()
|
||||
end,
|
||||
"Toggle Breakpoint",
|
||||
},
|
||||
B = {
|
||||
function()
|
||||
require("dap").clear_breakpoints()
|
||||
end,
|
||||
"Clear Breakpoints",
|
||||
},
|
||||
c = {
|
||||
function()
|
||||
require("dap").continue()
|
||||
end,
|
||||
"Start/Continue",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
which_key.setup(setup)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue