aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2023-11-29 23:40:28 -0800
committerSteven Arcangeli <stevearc@stevearc.com>2023-11-29 23:40:32 -0800
commit3fc2c956d99216b2816f07d2b946020ba2e02457 (patch)
tree01a50271c3092b05fae1c3e27aac16fe3748b5f9
parenteddd6431370814caacec1d1e3c7d6d95d41b133d (diff)
ci: workflow automation
-rw-r--r--lua/conform/formatters/prettier.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/lua/conform/formatters/prettier.lua b/lua/conform/formatters/prettier.lua
index ea45ffb..5b00d7b 100644
--- a/lua/conform/formatters/prettier.lua
+++ b/lua/conform/formatters/prettier.lua
@@ -1,3 +1,16 @@
+require("conform").setup({
+ formatters = {
+ prettier = {
+ args = function(ctx)
+ if vim.endswith(ctx.filename, ".ejs") then
+ return { "--stdin-filepath", "$FILENAME", "--parser", "html" }
+ end
+ return { "--stdin-filepath", "$FILENAME" }
+ end,
+ },
+ },
+})
+
local util = require("conform.util")
---@type conform.FileFormatterConfig
return {