feat: config refresh

This commit is contained in:
Devin Haska 2024-12-23 18:47:58 -08:00
parent a24128cfca
commit f956194c53
16 changed files with 217 additions and 233 deletions

View file

@ -1,36 +1,66 @@
return {
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
css = { "prettierd" },
scss = { "prettierd" },
html = { "djlint" },
lua = { "stylua" },
markdown = { "prettierd" },
javascript = { "prettierd" },
javascriptreact = { "prettierd" },
json = { "prettierd" },
jsonc = { "prettierd" },
toml = { "taplo" },
typescript = { "prettierd" },
typescriptreact = { "prettierd" },
},
format_on_save = {
lsp_fallback = true,
},
formatters = {
taplo = {
args = function()
-- conform.nvim does not parse bash envvars, so we do it ourselves
local CONFIG_PATH = os.getenv("HOME") .. "/.config/taplo/taplo.toml"
return {
"format",
"--config",
CONFIG_PATH,
"-",
}
end,
{
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
css = { "prettierd" },
scss = { "prettierd" },
html = { "djlint" },
lua = { "stylua" },
markdown = { "prettierd" },
javascript = { "prettierd" },
javascriptreact = { "prettierd" },
json = { "prettierd" },
jsonc = { "prettierd" },
php = { "php_cs_fixer" },
toml = { "taplo" },
typescript = { "prettierd" },
typescriptreact = { "prettierd" },
twig = { "twig-cs-fixer" },
},
format_on_save = {
lsp_fallback = true,
},
formatters = {
taplo = {
args = function()
-- conform.nvim does not parse bash envvars, so we do it ourselves
local CONFIG_PATH = os.getenv("HOME") .. "/.config/taplo/taplo.toml"
return {
"format",
"--config",
CONFIG_PATH,
"-",
}
end,
},
php_cs_fixer = {
args = function()
local CONFIG_PATH = os.getenv("HOME") .. "/.config/php-cs-fixer/php-cs-fixer.php"
return {
"fix",
"$FILENAME",
"--config",
CONFIG_PATH,
}
end,
},
},
},
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
opts = {
ensure_installed = {
"djlint",
"php-cs-fixer",
"prettierd",
"proselint",
"stylua",
"twig-cs-fixer",
},
auto_update = true,
automatic_installation = true,
},
},
}