refactor: consolidate Mason configuration with dynamic framework support
- 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
This commit is contained in:
parent
9a2b77fe5f
commit
306fa774af
@ -4,7 +4,7 @@ if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
|||||||
return {
|
return {
|
||||||
{ -- further customize the options set by the community
|
{ -- further customize the options set by the community
|
||||||
"yetone/avante.nvim",
|
"yetone/avante.nvim",
|
||||||
version = "0.0.23",
|
version = "0.0.27",
|
||||||
---@type avante.Config
|
---@type avante.Config
|
||||||
opts = {
|
opts = {
|
||||||
provider = "deepseek",
|
provider = "deepseek",
|
||||||
|
|||||||
47
lua/plugins/mason/init.lua
Normal file
47
lua/plugins/mason/init.lua
Normal file
@ -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(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user