aboutsummaryrefslogtreecommitdiff
path: root/config/nvim/lua/dap_config.lua
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-04-11 16:00:13 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-04-11 16:00:13 +0200
commit9748abe38cb64bfa388c3f5d441b3779f425cfdf (patch)
tree58386f866bfbec3c8579e6d3324445f58eb6d01d /config/nvim/lua/dap_config.lua
parent7c36e04c36413c0469bc9f2a329ad362735a0ecf (diff)
parent957e0f6119ab3681e02029cdd98d0a1bc3bbe092 (diff)
Merge branch 'main' of git.sr.ht:~rbdr/dotfiles
Diffstat (limited to 'config/nvim/lua/dap_config.lua')
-rw-r--r--config/nvim/lua/dap_config.lua30
1 files changed, 18 insertions, 12 deletions
diff --git a/config/nvim/lua/dap_config.lua b/config/nvim/lua/dap_config.lua
index b84af74..9d9fa64 100644
--- a/config/nvim/lua/dap_config.lua
+++ b/config/nvim/lua/dap_config.lua
@@ -6,25 +6,35 @@ vim.keymap.set('n', '<leader>d', function()
end)
require("dap-vscode-js").setup({
- debugger_path = os.getenv('HOME') .. '/projects/tools/vscode-js-debug/out/adapter.bundle.js',
+ debugger_path = os.getenv('HOME') .. '/projects/vendor/vscode-js-debug/out/adapter.bundle.js',
adapters = { 'pwa-node', 'node-terminal' },
})
+require("dap").adapters["pwa-node"] = {
+ type = 'server',
+ host = 'localhost',
+ port = '${port}',
+ executable = {
+ command = 'node',
+ -- 💀 Make sure to update this path to point to your installation
+ args = { os.getenv('HOME') .. '/projects/vendor/vscode-js-debug/src/dapDebugServer.ts', '${port}' },
+ }
+}
+
dap.configurations.javascript = {
{
type = "pwa-node",
- request = "launch",
- name = "Launch file",
- program = "${file}",
+ request = "attach",
+ name = "Attach",
cwd = "${workspaceFolder}",
},
{
type = "pwa-node",
- request = "attach",
- name = "Attach",
- processId = require'dap.utils'.pick_process,
+ request = "launch",
+ name = "Launch file",
+ program = "${file}",
cwd = "${workspaceFolder}",
- }
+ },
}
dap.adapters.firefox = {
@@ -108,7 +118,3 @@ dap.configurations.python = {
end;
},
}
-
-require('neodev').setup({
- library = { plugins = { "nvim-dap-ui" }, types = true }
-})