From 0e61fb765632508edf28a166ea8c6f1573d3069d Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 6 Sep 2024 18:04:10 +0530 Subject: [PATCH] mason: add warning message for removed option "ensure_installed" --- lua/nvchad/plugins/init.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/nvchad/plugins/init.lua b/lua/nvchad/plugins/init.lua index 4d04630..e12e2f1 100644 --- a/lua/nvchad/plugins/init.lua +++ b/lua/nvchad/plugins/init.lua @@ -84,6 +84,22 @@ return { opts = function() return require "nvchad.configs.mason" end, + config = function(_, opts) + if opts.ensure_installed then + vim.api.nvim_echo({ + { "\n  ensure_installed has been removed! use M.mason.pkgs table in your chadrc.\n", "WarningMsg" }, + { "  https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua#L85 \n\n", "FloatBorder" }, + { + "  MasonInstallAll will automatically install all mason packages of tools configured in your plugins. \n", + "healthSuccess", + }, + { "  Currently supported plugins are : lspconfig, nvim-lint, conform. \n", "Added" }, + { "  So dont add them in your chadrc as MasonInstallAll automatically installs them! \n", "Changed" }, + }, false, {}) + end + + require("mason").setup(opts) + end, }, {