From 468f486203b74e89edf40bd67c27b7f68ea38729 Mon Sep 17 00:00:00 2001 From: pml68 Date: Wed, 24 Apr 2024 10:10:00 +0200 Subject: feat: automatically install Mason extras on first run --- README.md | 4 +--- lua/pml68/plugins.lua | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 89b51b8..6a4433f 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,8 @@ My custom Neovim setup # Installation -Download in your config directory +Download into your config directory ```sh git clone https://github.com/pml68/nvim-setup ~/.config/nvim ``` - -After starting Neovim, and letting Lazy and nvim-treesitter install everything, run the `:MasonInstallAll` command to install the required LSPs and formatters diff --git a/lua/pml68/plugins.lua b/lua/pml68/plugins.lua index 08cb32f..4e4b440 100644 --- a/lua/pml68/plugins.lua +++ b/lua/pml68/plugins.lua @@ -123,12 +123,13 @@ local plugins = { require("mason").setup(opts) vim.api.nvim_create_user_command("MasonInstallAll",function() if opts.ensure_installed and #opts.ensure_installed > 0 then - vim.cmd("MasonInstall"..table.concat(opts.ensure_installed,"")) + vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed," ")) end end,{}) vim.g.mason_binaries_list = opts.ensure_installed - end + end, + build = ":MasonInstallAll", }, --Fuzzyfinder { -- cgit v1.2.3