61 lines
1.4 KiB
Lua
61 lines
1.4 KiB
Lua
return {
|
|
{
|
|
"mfussenegger/nvim-dap",
|
|
config = function()
|
|
local dap = require("dap")
|
|
dap.adapters["pwa-node"] = {
|
|
type = "server",
|
|
host = "localhost",
|
|
port = "${port}",
|
|
executable = {
|
|
command = "js-debug-adapter",
|
|
args = { "${port}" },
|
|
}
|
|
}
|
|
dap.configurations.typescript = {
|
|
{
|
|
type = "pwa-node",
|
|
request = "launch",
|
|
name = "Launch file",
|
|
program = "${file}",
|
|
cwd = "${workspaceFolder}",
|
|
},
|
|
{
|
|
type = 'pwa-node',
|
|
request = 'attach',
|
|
name = 'Attach to Node app',
|
|
address = 'localhost',
|
|
port = 9229,
|
|
cwd = '${workspaceFolder}',
|
|
restart = true,
|
|
},
|
|
}
|
|
dap.configurations.javascript = dap.configurations.typescript
|
|
end
|
|
},
|
|
{
|
|
"rcarriga/nvim-dap-ui",
|
|
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
|
config = function(opts)
|
|
local dap, dapui = require("dap"), require("dapui")
|
|
dapui.setup(opts)
|
|
dap.listeners.before.attach.dapui_config = function()
|
|
dapui.open()
|
|
end
|
|
dap.listeners.before.launch.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
|
|
end,
|
|
},
|
|
{
|
|
"theHamsta/nvim-dap-virtual-text",
|
|
dependencies = { "mfussenegger/nvim-dap", "nvim-treesitter/nvim-treesitter" }
|
|
}
|
|
|
|
}
|