aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/prettierd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/conform/formatters/prettierd.lua')
-rw-r--r--lua/conform/formatters/prettierd.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/lua/conform/formatters/prettierd.lua b/lua/conform/formatters/prettierd.lua
new file mode 100644
index 0000000..0af6baf
--- /dev/null
+++ b/lua/conform/formatters/prettierd.lua
@@ -0,0 +1,24 @@
+local util = require("conform.util")
+---@type conform.FormatterConfig
+return {
+ meta = {
+ url = "https://github.com/fsouza/prettierd",
+ description = "prettier, as a daemon, for ludicrous formatting speed.",
+ },
+ command = util.from_node_modules("prettierd"),
+ args = { "$FILENAME" },
+ cwd = util.root_file({
+ -- https://prettier.io/docs/en/configuration.html
+ ".prettierrc",
+ ".prettierrc.json",
+ ".prettierrc.yml",
+ ".prettierrc.yaml",
+ ".prettierrc.json5",
+ ".prettierrc.js",
+ ".prettierrc.cjs",
+ ".prettierrc.toml",
+ "prettier.config.js",
+ "prettier.config.cjs",
+ "package.json",
+ }),
+}