[dap] Some progress
Looks like we can load the launch.json. But it seems the debugger is being started twice, as I get an EADDRINUSE error on :DapContinue
This commit is contained in:
parent
c3109dcf17
commit
938ff36c6b
1 changed files with 8 additions and 2 deletions
|
@ -451,14 +451,18 @@ vim.keymap.set('n', '<leader>st', '<cmd>Lspsaga term_toggle<CR>')
|
||||||
|
|
||||||
-- setup adapters
|
-- setup adapters
|
||||||
require('dap-vscode-js').setup({
|
require('dap-vscode-js').setup({
|
||||||
|
node_path = 'node',
|
||||||
debugger_path = vim.fn.stdpath('data') .. '/mason/packages/js-debug-adapter',
|
debugger_path = vim.fn.stdpath('data') .. '/mason/packages/js-debug-adapter',
|
||||||
debugger_cmd = { 'js-debug-adapter' },
|
debugger_cmd = { 'js-debug-adapter' },
|
||||||
adapters = { 'pwa-node', 'pwa-chrome', 'pwa-msedge', 'node-terminal', 'pwa-extensionHost' },
|
adapters = { 'pwa-node', 'pwa-chrome', 'pwa-msedge', 'node-terminal', 'pwa-extensionHost' },
|
||||||
|
log_file_path = vim.fn.stdpath('cache') .. '/dap_vscode_js.log',
|
||||||
|
log_file_level = 1,
|
||||||
|
log_console_level = vim.log.levels.ERROR,
|
||||||
})
|
})
|
||||||
|
|
||||||
local dap = require('dap')
|
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
local dap = require('dap')
|
||||||
for _, language in ipairs({ "typescript", "javascript" }) do
|
for _, language in ipairs({ "typescript", "javascript" }) do
|
||||||
dap.configurations[language] = {
|
dap.configurations[language] = {
|
||||||
{
|
{
|
||||||
|
@ -493,7 +497,9 @@ for _, language in ipairs({ "typescript", "javascript" }) do
|
||||||
end
|
end
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
require('dap.ext.vscode').load_launchjs(nil, {})
|
local types_to_filetypes_table = {}
|
||||||
|
types_to_filetypes_table['pwa-node'] = { 'javascript', 'typescript' }
|
||||||
|
require('dap.ext.vscode').load_launchjs(nil, types_to_filetypes_table)
|
||||||
|
|
||||||
-- Tweak GitSigns blame color
|
-- Tweak GitSigns blame color
|
||||||
-- This differentiates the cursorline from the git blame text
|
-- This differentiates the cursorline from the git blame text
|
||||||
|
|
Loading…
Reference in a new issue