dap
This commit is contained in:
parent
cf7e6e2aea
commit
808f5a05dc
0
nvim/lua/dap/jsts.lua
Normal file
0
nvim/lua/dap/jsts.lua
Normal file
@ -1,10 +1,12 @@
|
|||||||
vim.fn.sign_define('DapBreakpoint', { text = '🟥', texthl = '', linehl = '', numhl = '' })
|
vim.fn.sign_define('DapBreakpoint', { text = '🟥', texthl = '', linehl = '', numhl = '' })
|
||||||
vim.fn.sign_define('DapStopped', { text = '⭐️', texthl = '', linehl = '', numhl = '' })
|
vim.fn.sign_define('DapStopped', { text = '⭐️', texthl = '', linehl = '', numhl = '' })
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
|
local dapui = require("dapui")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local DEBUGGER_PATH = {os.getenv('HOME')..'/.local/share/nvim/mason/packages/js-debug-adapter'}
|
--local DEBUGGER_PATH = {os.getenv('HOME')..'/.local/share/nvim/mason/packages/js-debug-adapter'}
|
||||||
|
local DEBUGGER_PATH = vim.fn.stdpath "data" .. "/site/pack/packer/opt/vscode-js-debug"
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
@ -39,14 +41,14 @@ function M.setup()
|
|||||||
request = "launch",
|
request = "launch",
|
||||||
name = "Launch File",
|
name = "Launch File",
|
||||||
program = "${file}",
|
program = "${file}",
|
||||||
cwd = "${workspacefolder}"
|
cwd = "${workspaceFolder}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "pwa-node",
|
type = "pwa-node",
|
||||||
request = "attach",
|
request = "attach",
|
||||||
name = "Attach",
|
name = "Attach",
|
||||||
processId = require("dap.utils").pick_process,
|
processId = require("dap.utils").pick_process,
|
||||||
cwd = "${workspacefolder}"
|
cwd = "${workspaceFolder}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "pwa-node",
|
type = "pwa-node",
|
||||||
@ -54,17 +56,27 @@ function M.setup()
|
|||||||
name = "Debug Jest Tests",
|
name = "Debug Jest Tests",
|
||||||
runtimeExecutable = "node",
|
runtimeExecutable = "node",
|
||||||
runtimeArgs = {
|
runtimeArgs = {
|
||||||
"./node_modules/jest/bin/jestj",
|
"./node_modules/jest/bin/jest.js",
|
||||||
"--runInBand",
|
"--runInBand",
|
||||||
},
|
},
|
||||||
rootPath = "${workspaceFolder}",
|
rootPath = "${workspaceFolder}",
|
||||||
console = "integratedTerminal",
|
console = "integratedTerminal",
|
||||||
internalConsoleOptions = "neverOpen",
|
internalConsoleOptions = "neverOpen",
|
||||||
cwd = "${workspacefolder}"
|
cwd = "${workspaceFolder}"
|
||||||
} }
|
} }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
M.setup()
|
require("dapui").setup()
|
||||||
return M
|
|
||||||
|
|
||||||
|
M.setup()
|
||||||
|
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
|
||||||
|
return M
|
||||||
|
Loading…
Reference in New Issue
Block a user