From 5c35604ebf7d969121bc31f21160b1d9c071c51c Mon Sep 17 00:00:00 2001 From: Andreas Gerlach Date: Sun, 23 Jul 2023 10:27:28 +0200 Subject: [PATCH] fix: rust dap adapter installation --- lua/lazyvim/plugins/extras/lang/rust.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 4e827270..30fc6bd3 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -31,13 +31,17 @@ return { -- Ensure Rust debugger is installed { - "williamboman/mason.nvim", + "mfussenegger/nvim-dap", optional = true, - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "codelldb" }) - end - end, + dependencies = { + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "codelldb" }) + end, + }, + }, }, {