I am trying to setup the debugger from react and am successful in doing so, only if I add my config file somewhere inside the Astrovim folder and calling require for this config file
local dap = require("dap")
dap.set_log_level("TRACE")
dap.adapters.node2 = {
type = "executable",
command = "node",
args = { vim.fn.stdpath("data") .. "/mason/packages/node-debug2-adapter/out/src/nodeDebug.js" },
}
dap.configurations.javascriptreact = {
{
name = "Chrome (9222)",
type = "chrome",
request = "attach",
program = "${file}",
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = "inspector",
port = 9222,
webRoot = "${workspaceFolder}",
},
{
name = "React Native (8081) (Node2)",
type = "node2",
request = "attach",
program = "${file}",
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = "inspector",
console = "integratedTerminal",
port = 8081,
},
{
name = "Attach React Native (8081)",
type = "pwa-node",
request = "attach",
processId = require("dap.utils").pick_process,
cwd = vim.fn.getcwd(),
rootPath = "${workspaceFolder}",
skipFiles = { "<node_internals>/**", "node_modules/**" },
sourceMaps = true,
protocol = "inspector",
console = "integratedTerminal",
},
}
I tried following the same method as above, the file is getting detected by the astro config, but dap this new dap config is not getting appended
Any help on how to add this config in my user astro config will be much appreciated
I don't want to lose new features
I am trying to setup the debugger from react and am successful in doing so, only if I add my config file somewhere inside the Astrovim folder and calling require for this config file
Eg added my config
nvim-dap-config.luainsideastrovim/plugins/configs/nvim-dap-config.luaand calledlocal dap-config = require("plugins.configs.nvim-dap-config")inside mappings.lua .Everything is working as expectednow I wanted to move this file to
$HOME/config/astrovim/user/...Can i get some help on how to acheive thisContents of nvim-dap-config.lua