From 8dae76c1fd6fb90199b56cda8b6ec21576d02eb5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 May 2024 16:44:01 +0200 Subject: [PATCH] fix(dap): use jsonc support from plenary. Same as the code from neoconf. Fixes #3174 --- lua/lazyvim/plugins/extras/dap/core.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index 285d7258..fa6724b3 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -126,7 +126,10 @@ return { ["node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, ["pwa-node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, }) - vscode.json_decode = require("neoconf.json.jsonc").decode_jsonc + local json = require("plenary.json") + vscode.json_decode = function(str) + return vim.json.decode(json.json_strip_comments(str)) + end vscode.load_launchjs(nil, filetypes) end, }