diff options
author | Rene Zbinden <rene.zbinden@gmail.com> | 2023-09-26 08:17:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 23:17:50 -0700 |
commit | 28ecd5cf9132213417bff41d79477354cb81f50c (patch) | |
tree | dcce215910e3ac7f1723d26e2a9f51166ab1e3a6 | |
parent | bbb7df3b3210fff165f2be429cf669726d159de4 (diff) |
feat: add templ support (#73)
chore: bla
chore: update
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lua/conform/formatters/templ.lua | 9 |
2 files changed, 10 insertions, 0 deletions
@@ -221,6 +221,7 @@ To view configured and available formatters, as well as to see the log file, run - [swift_format](https://github.com/apple/swift-format) - Swift formatter from apple. Requires building from source with `swift build`. - [swiftformat](https://github.com/nicklockwood/SwiftFormat) - SwiftFormat is a code library and command-line tool for reformatting `swift` code on macOS or Linux. - [taplo](https://github.com/tamasfe/taplo) - A TOML toolkit written in Rust +- [templ](https://templ.guide/commands-and-tools/cli/#formatting-templ-files) - A Go HTML template engine - [terraform_fmt](https://www.terraform.io/docs/cli/commands/fmt.html) - The terraform-fmt command rewrites `terraform` configuration files to a canonical format and style. - [trim_newlines](https://www.gnu.org/software/gawk/manual/gawk.html) - Trim new lines with awk - [trim_whitespace](https://www.gnu.org/software/gawk/manual/gawk.html) - Trim whitespaces with awk diff --git a/lua/conform/formatters/templ.lua b/lua/conform/formatters/templ.lua new file mode 100644 index 0000000..74c6f7a --- /dev/null +++ b/lua/conform/formatters/templ.lua @@ -0,0 +1,9 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://templ.guide/commands-and-tools/cli/#formatting-templ-files", + description = "Formats templ template files.", + }, + command = "templ", + args = { "fmt" }, +} |