Skip to content

Instantly share code, notes, and snippets.

@Sardonyx001
Created November 13, 2024 04:56
Show Gist options
  • Save Sardonyx001/e8f4cf48eef9407bfa24d94f80df4ef4 to your computer and use it in GitHub Desktop.
Save Sardonyx001/e8f4cf48eef9407bfa24d94f80df4ef4 to your computer and use it in GitHub Desktop.
Caddyfile formatter for neovim
return {
{
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
["_"] = { "caddy_fmt" },
},
formatters = {
caddy_fmt = {
command = "caddy",
args = { "fmt" },
stdin = true,
condition = function(ctx)
return vim.fs.basename(ctx.filename) ~= "Caddyfile"
end,
},
},
},
},
}
@Sardonyx001
Copy link
Author

Simple custom formatter for Caddyfiles based on the amazing conform.nvim plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment