From 7589157d5a5e212393c413e055d4926c55d30916 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:37:08 -0500 Subject: [PATCH] add mason-tool-installer --- configs/nvim/lua/lazy-plugins.lua | 8 ++++++-- configs/nvim/lua/lsp-setup.lua | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/configs/nvim/lua/lazy-plugins.lua b/configs/nvim/lua/lazy-plugins.lua index fe7b6e7..bceffca 100644 --- a/configs/nvim/lua/lazy-plugins.lua +++ b/configs/nvim/lua/lazy-plugins.lua @@ -21,7 +21,11 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim - { 'williamboman/mason.nvim', config = true }, + { 'williamboman/mason.nvim', config = true, + dependencies = { + "WhoIsSethDaniel/mason-tool-installer.nvim", + }, + }, 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP @@ -201,7 +205,7 @@ require('lazy').setup({ json = { { 'prettierd', 'prettier' } }, lua = { 'stylua' }, markdown = { { 'prettierd', 'prettier' } }, - rust = { 'rustfmt' }, + rust = { 'rustywind', 'rustfmt' }, scss = { { 'prettierd', 'prettier' } }, sh = { 'shellharden', 'beautysh' }, toml = { 'taplo' }, diff --git a/configs/nvim/lua/lsp-setup.lua b/configs/nvim/lua/lsp-setup.lua index ed4f1c6..caeb95e 100644 --- a/configs/nvim/lua/lsp-setup.lua +++ b/configs/nvim/lua/lsp-setup.lua @@ -100,6 +100,23 @@ local servers = { zls = {}, } +local mason_tool_installer = require 'mason-tool-installer' +mason_tool_installer.setup { + ensure_installed = { + 'beautysh', + 'eslint_d', + 'htmlbeautifier', + 'nginx-language-server', + 'prettier', + 'prettierd', + 'rustywind', + 'shellcheck', + 'shellharden', + 'stylua', + 'yamlfix', + }, +} + -- Setup neovim lua configuration require('neodev').setup()