diff --git a/lua/plugins/avante-nvim.lua b/lua/plugins/avante-nvim.lua index c5f6049..9122811 100644 --- a/lua/plugins/avante-nvim.lua +++ b/lua/plugins/avante-nvim.lua @@ -4,7 +4,7 @@ if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE return { { -- further customize the options set by the community "yetone/avante.nvim", - version = "0.0.23", + version = "0.0.27", ---@type avante.Config opts = { provider = "deepseek", diff --git a/lua/plugins/mason/init.lua b/lua/plugins/mason/init.lua new file mode 100644 index 0000000..ad4a5ab --- /dev/null +++ b/lua/plugins/mason/init.lua @@ -0,0 +1,47 @@ +-- Mason plugin configuration for automatic tool installation +-- Dynamically installs tools based on the FRAMEWORK environment variable + +-- Framework-specific tool configurations +local FRAMEWORK_TOOLS = { + python = { + "black", + "python-lsp-server", + "mypy", + "pylint", + "flake8", + "pylama", + "bandit", + "pydocstyle", + "pyproject-flake8", + "pyproject-fmt", + "reorder-python-imports", + }, + vue = { + "eslint-lsp", + "stylelint-lsp", + "tailwindcss-language-server", + "typescript-language-server", + "vue-language-server", + "stylelint", + "prettier", + } +} + +--- Retrieves the appropriate tool set based on the current framework environment +--- @return table List of tools to install for the detected framework +local function get_framework_tools() + local current_framework = os.getenv("FRAMEWORK") + return FRAMEWORK_TOOLS[current_framework] or {} +end + +---@type LazySpec +return { + -- Mason tool installer for automatic package management + { + "WhoIsSethDaniel/mason-tool-installer.nvim", + opts = { + -- Install tools based on the detected framework + ensure_installed = get_framework_tools(), + }, + }, +}