aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsak Samsten <isak@samsten.se>2023-09-14 17:09:57 +0200
committerGitHub <noreply@github.com>2023-09-14 08:09:57 -0700
commit502a3583663ede11c8db1e9980db342b117d79f2 (patch)
tree307fc17fbc686cbd0d785716a4b28e0ce81a8539
parentfdc4a0f05c21012f2445a993ebdad700380dcfbf (diff)
feat: latexindent (#42)
-rw-r--r--README.md1
-rw-r--r--lua/conform/formatters/latexindent.lua9
2 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 41dd443..d440d9f 100644
--- a/README.md
+++ b/README.md
@@ -177,6 +177,7 @@ To view configured and available formatters, as well as to see the path to the l
- [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) - A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
- [isort](https://github.com/PyCQA/isort) - Python utility / library to sort imports alphabetically and automatically separate them into sections and by type.
- [jq](https://github.com/stedolan/jq) - Command-line JSON processor.
+- [latexindent](https://github.com/cmhughes/latexindent.pl) - A perl script for formatting LaTeX files that is generally included in major TeX distributions.
- [nixfmt](https://github.com/serokell/nixfmt) - nixfmt is a formatter for Nix code, intended to apply a uniform style.
- [nixpkgs_fmt](https://github.com/nix-community/nixpkgs-fmt) - nixpkgs-fmt is a Nix code formatter for nixpkgs.
- [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) - Auto-formatter for OCaml code.
diff --git a/lua/conform/formatters/latexindent.lua b/lua/conform/formatters/latexindent.lua
new file mode 100644
index 0000000..1ac3c4e
--- /dev/null
+++ b/lua/conform/formatters/latexindent.lua
@@ -0,0 +1,9 @@
+return {
+ meta = {
+ url = "https://github.com/cmhughes/latexindent.pl",
+ description = "A perl script for formatting LaTeX files that is generally included in major TeX distributions.",
+ },
+ command = "latexindent",
+ args = { "-" },
+ stdin = true,
+}