aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Nelson <79223278+clispios@users.noreply.github.com>2024-05-22 00:47:31 -0500
committerGitHub <noreply@github.com>2024-05-21 22:47:31 -0700
commitb999fad66fd797a57d745c1a999d000b889bd587 (patch)
tree1396483077fafa6da4bae17eb9b6da5ea44e4686
parentf3d0743fd40d989e69c2c1a57c86e4c241f67308 (diff)
feat: add support for leptosfmt (#415)
-rw-r--r--README.md1
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/leptosfmt.lua9
3 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index c4dfee5..f383d9c 100644
--- a/README.md
+++ b/README.md
@@ -245,6 +245,7 @@ You can view this list in vim with `:help conform-formatters`
- [ktfmt](https://github.com/facebook/ktfmt) - Reformats Kotlin source code to comply with the common community standard conventions.
- [ktlint](https://ktlint.github.io/) - An anti-bikeshedding Kotlin linter with built-in formatter.
- [latexindent](https://github.com/cmhughes/latexindent.pl) - A perl script for formatting LaTeX files that is generally included in major TeX distributions.
+- [leptosfmt](https://github.com/bram209/leptosfmt) - A formatter for the Leptos `view!` macro.
- [liquidsoap-prettier](https://github.com/savonet/liquidsoap-prettier) - A binary to format Liquidsoap scripts
- [markdown-toc](https://github.com/jonschlinkert/markdown-toc) - API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files.
- [markdownlint](https://github.com/DavidAnson/markdownlint) - A Node.js style checker and lint tool for Markdown/CommonMark files.
diff --git a/doc/conform.txt b/doc/conform.txt
index 6ca3265..4a09f31 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -270,6 +270,7 @@ FORMATTERS *conform-formatter
`ktlint` - An anti-bikeshedding Kotlin linter with built-in formatter.
`latexindent` - A perl script for formatting LaTeX files that is generally
included in major TeX distributions.
+`leptosfmt` - A formatter for the Leptos `view!` macro.
`liquidsoap-prettier` - A binary to format Liquidsoap scripts
`markdown-toc` - API and CLI for generating a markdown TOC (table of contents)
for a README or any markdown files.
diff --git a/lua/conform/formatters/leptosfmt.lua b/lua/conform/formatters/leptosfmt.lua
new file mode 100644
index 0000000..4fd2d98
--- /dev/null
+++ b/lua/conform/formatters/leptosfmt.lua
@@ -0,0 +1,9 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/bram209/leptosfmt",
+ description = "A formatter for the Leptos view! macro.",
+ },
+ command = "leptosfmt",
+ args = { "--stdin" },
+}