Created
November 13, 2024 04:56
-
-
Save Sardonyx001/e8f4cf48eef9407bfa24d94f80df4ef4 to your computer and use it in GitHub Desktop.
Caddyfile formatter for neovim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | |
}, | |
}, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple custom formatter for Caddyfiles based on the amazing conform.nvim plugin!