feat: correct my lvim config

This commit is contained in:
2024-09-02 23:36:54 +04:00
parent 0da8243d12
commit b767beebd0
10 changed files with 178 additions and 21 deletions

View File

@@ -32,8 +32,8 @@ dap.adapters["pwa-node"] = {
port = "${port}",
executable = {
command = "node",
-- 💀 Make sure to update this path to point to your installation
args = {"/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}"},
-- 💀 make sure to update this path to point to your installation
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}"},
}
}
@@ -61,11 +61,12 @@ dap.adapters.firefox = {
dap.configurations.typescriptreact = { -- change to typescript if needed
{
name = "Next.js: debug server-side",
type = "node-terminal",
name = 'Next.js: debug server-side',
type = "pwa-node",
request = "launch",
command = "npm run dev",
sourceMaps= true,
runtimeExecutable = "npm",
runtimeArgs = { "run", "dev" },
cwd = "${workspaceFolder}",
},
{
name = "Next.js: debug client-side with chrome",
@@ -90,3 +91,14 @@ dap.configurations.typescriptreact = { -- change to typescript if needed
}
dap.configurations.javascriptreact = dap.configurations.typescriptreact;
require("dapui").setup()
local dap, dapui = require("dap"), require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open({})
end
vim.keymap.set('n', '<leader>ui', require 'dapui'.toggle)