mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-05 00:41:44 +05:30
yaml - xml formatting with `xmllint` - Security linting with `trivy` for dockerfile, terraform & yaml
56 lines
1.8 KiB
Lua
56 lines
1.8 KiB
Lua
return {
|
|
{
|
|
"stevearc/conform.nvim",
|
|
lazy = true,
|
|
event = { "BufWritePre" },
|
|
opts = {
|
|
formatters_by_ft = {
|
|
bash = { "shfmt" },
|
|
sh = { "shfmt" },
|
|
zsh = { "shfmt" },
|
|
|
|
css = { "prettierd" },
|
|
graphql = { "prettierd" },
|
|
html = { "prettierd" },
|
|
javascript = { "prettierd" },
|
|
javascriptreact = { "prettierd" },
|
|
json = { "prettierd" },
|
|
svelte = { "prettierd" },
|
|
typescript = { "prettierd" },
|
|
typescriptreact = { "prettierd" },
|
|
|
|
lua = { "stylua" },
|
|
markdown = { "markdownlint" },
|
|
python = { "black" },
|
|
rust = { "rustfmt" },
|
|
xml = { "xmllint" },
|
|
yaml = { "yamlfmt" },
|
|
|
|
["_"] = { "trim_whitespace" },
|
|
},
|
|
format_on_save = {
|
|
lsp_fallback = true,
|
|
async = false,
|
|
timeout_ms = 500,
|
|
},
|
|
formatters = {
|
|
injected = { options = { ignore_errors = true } },
|
|
shfmt = { prepend_args = { "-i", "4" } },
|
|
markdownlint = {
|
|
prepend_args = {
|
|
"--config",
|
|
vim.loop.os_homedir() .. "/.config/templates/markdownlint.json",
|
|
},
|
|
},
|
|
yamlfmt = {
|
|
prepend_args = {
|
|
"-formatter",
|
|
"include_document_start=true,retain_line_breaks_single=true",
|
|
"-gitignore_excludes",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|