From b55c7734df72ff06659c16f5f9ed27b6b7199d44 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 23 Jun 2024 21:04:51 +0300 Subject: [PATCH] fix(dap): only load `mason-nvim-dap` when not disabled (#3784) ## What is this PR for? Only `require("mason-nvim-dap")` when it's not disabled ## Does this PR fix an existing issue? Fixes #3783 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/dap/core.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index 045fb022..ac6709f1 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -49,7 +49,9 @@ return { config = function() -- load mason-nvim-dap here, after all adapters have been setup - require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) + if LazyVim.has("mason-nvim-dap.nvim") then + require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) + end vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" })