diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 4bb280d608..476fbc6c83 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -71,21 +71,23 @@ return { }, opts = function() local dap = require("dap") - if not dap.adapters["pwa-node"] then - 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 = { - require("mason-registry").get_package("js-debug-adapter"):get_install_path() - .. "/js-debug/src/dapDebugServer.js", - "${port}", + for _, debugtype in ipairs({ "pwa-node", "node" }) do + if not dap.adapters[debugtype] then + require("dap").adapters[debugtype] = { + type = "server", + host = "localhost", + port = "${port}", + executable = { + command = "node", + -- 💀 Make sure to update this path to point to your installation + args = { + require("mason-registry").get_package("js-debug-adapter"):get_install_path() + .. "/js-debug/src/dapDebugServer.js", + "${port}", + }, }, - }, - } + } + end end for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do if not dap.configurations[language] then