Replaces AstroNvim v5 with from-scratch Neovim 0.12 config using vim.lsp.config()/vim.lsp.enable() natively, lazy.nvim, blink.cmp, and smart-splits tmux integration. tmux: new C-Space prefix, hjkl pane nav, resize key table, tpm plugins. kitty: add allow_remote_control for smart-splits.
42 lines
896 B
Lua
42 lines
896 B
Lua
local M = {}
|
|
|
|
local function setup()
|
|
local dap = require("dap")
|
|
local mason_path = vim.fn.stdpath("data") .. "/mason/packages/js-debug-adapter"
|
|
|
|
dap.adapters["pwa-node"] = {
|
|
type = "server",
|
|
host = "localhost",
|
|
port = "${port}",
|
|
executable = {
|
|
command = "node",
|
|
args = { mason_path .. "/js-debug/src/dapDebugServer.js", "${port}" },
|
|
},
|
|
}
|
|
|
|
local js_config = {
|
|
{
|
|
type = "pwa-node",
|
|
request = "launch",
|
|
name = "Launch file",
|
|
program = "${file}",
|
|
cwd = "${workspaceFolder}",
|
|
sourceMaps = true,
|
|
},
|
|
{
|
|
type = "pwa-node",
|
|
request = "attach",
|
|
name = "Attach",
|
|
processId = require("dap.utils").pick_process,
|
|
cwd = "${workspaceFolder}",
|
|
},
|
|
}
|
|
|
|
for _, lang in ipairs({ "javascript", "typescript", "svelte" }) do
|
|
dap.configurations[lang] = js_config
|
|
end
|
|
end
|
|
|
|
setup()
|
|
return M
|