From caf227dd08e83c826800cb88c34c87c600793fa3 Mon Sep 17 00:00:00 2001 From: Miguel Palau Date: Tue, 23 Jul 2024 09:05:18 -0600 Subject: [PATCH] fix(dap): extend dap.configurations from .vscode/launch.json (#4106) ## Description This PR allows the nvim-dap module to read from vscode's launch.json and add those configurations to the ones in nvim-dap. ## Related Issue(s) ## Screenshots Before: image After: image ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Micah Halter --- lua/lazyvim/plugins/extras/dap/core.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index ac6709f1..67a3d71b 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -69,6 +69,11 @@ return { vscode.json_decode = function(str) return vim.json.decode(json.json_strip_comments(str)) end + + -- Extends dap.configurations with entries read from .vscode/launch.json + if vim.fn.filereadable(".vscode/launch.json") then + vscode.load_launchjs() + end end, },