fixing deprecated packages
This commit is contained in:
28
cleanup_deprecated_adapters.lua
Normal file
28
cleanup_deprecated_adapters.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-- Cleanup script for deprecated debug adapters
|
||||||
|
-- Run this in Neovim with :lua loadfile("cleanup_deprecated_adapters.lua")()
|
||||||
|
|
||||||
|
local function cleanup_deprecated_adapters()
|
||||||
|
local mason_registry = require("mason-registry")
|
||||||
|
|
||||||
|
-- List of deprecated adapters to remove
|
||||||
|
local deprecated_adapters = {
|
||||||
|
"node-debug2-adapter",
|
||||||
|
"chrome-debug-adapter"
|
||||||
|
}
|
||||||
|
|
||||||
|
print("🧹 Cleaning up deprecated debug adapters...")
|
||||||
|
|
||||||
|
for _, adapter in ipairs(deprecated_adapters) do
|
||||||
|
if mason_registry.is_installed(adapter) then
|
||||||
|
print("🗑️ Uninstalling " .. adapter)
|
||||||
|
mason_registry.uninstall(adapter)
|
||||||
|
else
|
||||||
|
print("✅ " .. adapter .. " is not installed")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
print("✨ Cleanup complete! Make sure to restart Neovim for changes to take effect.")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Run the cleanup
|
||||||
|
cleanup_deprecated_adapters()
|
||||||
@@ -74,7 +74,7 @@ return {
|
|||||||
|
|
||||||
-- 🧠 Mason DAP
|
-- 🧠 Mason DAP
|
||||||
require("mason-nvim-dap").setup({
|
require("mason-nvim-dap").setup({
|
||||||
ensure_installed = { "node2", "chrome", "firefox" },
|
ensure_installed = { "js-debug-adapter", "firefox" },
|
||||||
automatic_setup = true,
|
automatic_setup = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -173,19 +173,20 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- 🧠 Node.js (NestJS / TypeScript)
|
-- 🧠 Node.js (NestJS / TypeScript) - Using js-debug-adapter
|
||||||
dap.adapters.node2 = {
|
dap.adapters.node = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = "node",
|
command = "node",
|
||||||
args = {
|
args = {
|
||||||
os.getenv("HOME") .. "/.local/share/nvim/mason/packages/node-debug2-adapter/out/src/nodedebug.js",
|
os.getenv("HOME") .. "/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js",
|
||||||
|
"${port}",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.typescript = {
|
dap.configurations.typescript = {
|
||||||
{
|
{
|
||||||
name = "Launch NestJS",
|
name = "Launch NestJS",
|
||||||
type = "node2",
|
type = "node",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
program = "${workspaceFolder}/dist/main.js",
|
program = "${workspaceFolder}/dist/main.js",
|
||||||
args = {},
|
args = {},
|
||||||
@@ -199,7 +200,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "Attach to NestJS (start:debug)",
|
name = "Attach to NestJS (start:debug)",
|
||||||
type = "node2",
|
type = "node",
|
||||||
request = "attach",
|
request = "attach",
|
||||||
port = 9229,
|
port = 9229,
|
||||||
protocol = "inspector",
|
protocol = "inspector",
|
||||||
@@ -209,5 +210,8 @@ return {
|
|||||||
skipFiles = { "<node_internals>/**" },
|
skipFiles = { "<node_internals>/**" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Also add JavaScript configurations
|
||||||
|
dap.configurations.javascript = dap.configurations.typescript
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user