X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/73a2d9946ff469afa1a1a30edb1aa350032bb44c..82df2481ef89421986d363ca519a3c8c693e7751:/config/nvim/lua/dap_config.lua?ds=inline diff --git a/config/nvim/lua/dap_config.lua b/config/nvim/lua/dap_config.lua index 2131958..b84af74 100644 --- a/config/nvim/lua/dap_config.lua +++ b/config/nvim/lua/dap_config.lua @@ -5,29 +5,26 @@ vim.keymap.set('n', 'd', function() require("dapui").toggle() end) -dap.adapters.node2 = { - type = 'executable', - command = 'node', - args = {os.getenv('HOME') .. '/projects/tools/vscode-node-debug2/out/src/nodeDebug.js'}, -} +require("dap-vscode-js").setup({ + debugger_path = os.getenv('HOME') .. '/projects/tools/vscode-js-debug/out/adapter.bundle.js', + adapters = { 'pwa-node', 'node-terminal' }, +}) + dap.configurations.javascript = { { - name = 'Launch', - type = 'node2', - request = 'launch', - program = '${file}', - cwd = vim.fn.getcwd(), - sourceMaps = true, - protocol = 'inspector', - console = 'integratedTerminal', + type = "pwa-node", + request = "launch", + name = "Launch file", + program = "${file}", + cwd = "${workspaceFolder}", }, { - -- For this to work you need to make sure the node process is started with the `--inspect` flag. - name = 'Attach to process', - type = 'node2', - request = 'attach', + type = "pwa-node", + request = "attach", + name = "Attach", processId = require'dap.utils'.pick_process, - }, + cwd = "${workspaceFolder}", + } } dap.adapters.firefox = { @@ -37,14 +34,14 @@ dap.adapters.firefox = { } dap.configurations.typescript = { - { - name = 'Debug with Firefox', - type = 'firefox', - request = 'launch', - reAttach = true, - url = 'http://localhost:3000', - webRoot = '${workspaceFolder}', - firefoxExecutable = '/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox' + { + name = 'Debug with Firefox', + type = 'firefox', + request = 'launch', + reAttach = true, + url = 'http://localhost:3000', + webRoot = '${workspaceFolder}', + firefoxExecutable = '/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox' } } @@ -115,4 +112,3 @@ dap.configurations.python = { require('neodev').setup({ library = { plugins = { "nvim-dap-ui" }, types = true } }) -