mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-27 19:28:59 +02:00
fix(dap): load vscode launch files with jsonc parser (#1839)
This seems to be the proper fix for #1503. jsonc ensures compatibility with native vscode. Ref: https://github.com/mfussenegger/nvim-dap/issues/964
This commit is contained in:
parent
a97fa3b756
commit
543dead590
1 changed files with 10 additions and 2 deletions
|
@ -26,8 +26,6 @@ return {
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
-- setup dap config by VsCode launch.json file
|
|
||||||
-- require("dap.ext.vscode").load_launchjs()
|
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
local dapui = require("dapui")
|
local dapui = require("dapui")
|
||||||
dapui.setup(opts)
|
dapui.setup(opts)
|
||||||
|
@ -81,6 +79,11 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- VsCode launch.json parser
|
||||||
|
{
|
||||||
|
"folke/neoconf.nvim",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
|
@ -115,5 +118,10 @@ return {
|
||||||
{ text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] }
|
{ text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] }
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- setup dap config by VsCode launch.json file
|
||||||
|
local vscode = require("dap.ext.vscode")
|
||||||
|
vscode.json_decode = require("neoconf.json.jsonc").decode_jsonc
|
||||||
|
vscode.load_launchjs()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue