From 664cd6ba0204f67d603b38e477d19dbe9974b199 Mon Sep 17 00:00:00 2001 From: srdusr Date: Sat, 18 Mar 2023 23:58:55 +0200 Subject: Add javascript config --- lua/plugins/dap.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lua') diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index d858760..9b3f0a9 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -52,6 +52,26 @@ dap.configurations.cpp = { dap.configurations.c = dap.configurations.cpp dap.configurations.rust = dap.configurations.cpp +-- javascript +dap.adapters.node2 = { + type = 'executable', + command = 'node-debug2-adapter', + args = {}, +} + +dap.configurations.javascript = { + { + name = 'Launch', + type = 'node2', + request = 'attach', + program = '${file}', + cwd = vim.fn.getcwd(), + sourceMaps = true, + protocol = 'inspector', + console = 'integratedTerminal', + }, +} + dap.adapters.python = { type = 'executable'; command = vim.trim(vim.fn.system('which python')); -- cgit v1.2.3