mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-04 14:34:33 +02:00
fix(extras.lang.typescript): support node
debug type along with pwa-node
(#2983)
* feat(typescript): add "node" debug adapter add "node" debug adapter for compatibility with .vscode/launch.json * refactor: ... --------- Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
parent
a8659d02b9
commit
d36e3a5c73
1 changed files with 14 additions and 0 deletions
|
@ -103,6 +103,20 @@ return {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
if not dap.adapters["node"] then
|
||||||
|
dap.adapters["node"] = function(cb, config)
|
||||||
|
if config.type == "node" then
|
||||||
|
config.type = "pwa-node"
|
||||||
|
end
|
||||||
|
local nativeAdapter = dap.adapters["pwa-node"]
|
||||||
|
if type(nativeAdapter) == "function" then
|
||||||
|
nativeAdapter(cb, config)
|
||||||
|
else
|
||||||
|
cb(nativeAdapter)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do
|
for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do
|
||||||
if not dap.configurations[language] then
|
if not dap.configurations[language] then
|
||||||
dap.configurations[language] = {
|
dap.configurations[language] = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue