- Replace separate python.lua and vue.lua configs with unified init.lua - Add dynamic tool installation based on FRAMEWORK environment variable - Update avante.nvim plugin version from 0.0.23 to 0.0.27 - Remove obsolete mason/.gitignore file
48 lines
1.1 KiB
Lua
48 lines
1.1 KiB
Lua
-- 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(),
|
|
},
|
|
},
|
|
}
|