feat(neovim): Formatting for xml & linting for dockerfile, terraform,

yaml

- xml formatting with `xmllint`
- Security linting with `trivy` for dockerfile, terraform & yaml
This commit is contained in:
Pratik Tripathy
2025-10-13 19:33:24 +05:30
parent f3814850ba
commit 31659e55eb
2 changed files with 7 additions and 5 deletions

View File

@@ -5,24 +5,25 @@ return {
event = { "BufWritePre" }, event = { "BufWritePre" },
opts = { opts = {
formatters_by_ft = { formatters_by_ft = {
sh = { "shfmt" },
bash = { "shfmt" }, bash = { "shfmt" },
sh = { "shfmt" },
zsh = { "shfmt" }, zsh = { "shfmt" },
graphql = { "prettierd" },
css = { "prettierd" }, css = { "prettierd" },
graphql = { "prettierd" },
html = { "prettierd" }, html = { "prettierd" },
javascript = { "prettierd" }, javascript = { "prettierd" },
javascriptreact = { "prettierd" }, javascriptreact = { "prettierd" },
json = { "prettierd" },
svelte = { "prettierd" }, svelte = { "prettierd" },
typescript = { "prettierd" }, typescript = { "prettierd" },
typescriptreact = { "prettierd" }, typescriptreact = { "prettierd" },
json = { "prettierd" },
lua = { "stylua" }, lua = { "stylua" },
markdown = { "markdownlint" }, markdown = { "markdownlint" },
python = { "black" }, python = { "black" },
rust = { "rustfmt" }, rust = { "rustfmt" },
xml = { "xmllint" },
yaml = { "yamlfmt" }, yaml = { "yamlfmt" },
["_"] = { "trim_whitespace" }, ["_"] = { "trim_whitespace" },

View File

@@ -10,8 +10,9 @@ return {
lint.linters_by_ft = { lint.linters_by_ft = {
python = { "pylint" }, python = { "pylint" },
markdown = { "markdownlint" }, markdown = { "markdownlint" },
yaml = { "yamllint" }, yaml = { "yamllint", "trivy" },
dockerfile = { "hadolint" }, dockerfile = { "hadolint", "trivy" },
terraform = { "trivy" },
["*"] = { "codespell" }, ["*"] = { "codespell" },
} }