From 4aa549db2d304dfc70a2f09c6e2670bb80e2cdc1 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Wed, 19 Feb 2020 17:36:33 +0200 Subject: [PATCH] Enable Prettier's Lua support Re-implementation of #65 --- README.md | 2 +- format-all.el | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 190b0eb1..1b433bea 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Supported languages * **Kotlin** ([*ktlint*](https://github.com/shyiko/ktlint)) * **LaTeX** ([*latexindent*](https://github.com/cmhughes/latexindent.pl)) * **Ledger** ([*ledger-mode*](https://github.com/ledger/ledger-mode)) -* **Lua** ([*lua-fmt*](https://github.com/trixnz/lua-fmt)) +* **Lua** ([*lua-fmt*](https://github.com/trixnz/lua-fmt), [*prettier plugin-lua*](https://github.com/prettier/plugin-lua)) * **Markdown** ([*prettier*](https://prettier.io/)) * **Nix** ([*nixfmt*](https://github.com/serokell/nixfmt)) * **OCaml** ([*ocp-indent*](https://opam.ocaml.org/packages/ocp-indent/)) diff --git a/format-all.el b/format-all.el index a677aabd..1949955a 100644 --- a/format-all.el +++ b/format-all.el @@ -52,7 +52,7 @@ ;; - Kotlin (ktlint) ;; - LaTeX (latexindent) ;; - Ledger (ledger-mode) -;; - Lua (lua-fmt) +;; - Lua (lua-fmt, prettier plugin-lua) ;; - Markdown (prettier) ;; - Nix (nixfmt) ;; - OCaml (ocp-indent) @@ -646,9 +646,9 @@ Consult the existing formatters for examples of BODY." (define-format-all-formatter prettier (:executable "prettier") - (:install "npm install --global prettier @prettier/plugin-php prettier-plugin-solidity prettier-plugin-toml") + (:install "npm install --global prettier @prettier/plugin-lua @prettier/plugin-php prettier-plugin-solidity prettier-plugin-toml") (:languages - "CSS" "GraphQL" "JavaScript" "JSON" "JSX" "Less" "Markdown" "PHP" + "CSS" "GraphQL" "JavaScript" "JSON" "JSX" "Less" "Lua" "Markdown" "PHP" "SCSS" "Solidity" "TOML" "TSX" "TypeScript" "Vue" "YAML" ;; TODO: Use html-tidy instead of prettier for plain HTML. Enable ;; prettier's HTML support once we have multi-formatter support.