aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-03-18 23:58:55 +0200
committersrdusr <trevorgray@srdusr.com>2023-03-18 23:58:55 +0200
commit664cd6ba0204f67d603b38e477d19dbe9974b199 (patch)
tree2952e8adc6ffd85e1e8e5eb52b2800aaf05d8a68 /lua
parentd861abc849918a83581955d3046ca2c3b3591d83 (diff)
downloaddotfiles-664cd6ba0204f67d603b38e477d19dbe9974b199.tar.gz
dotfiles-664cd6ba0204f67d603b38e477d19dbe9974b199.zip
Add javascript config
Diffstat (limited to 'lua')
-rw-r--r--lua/plugins/dap.lua20
1 files changed, 20 insertions, 0 deletions
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'));