From 3fc2c956d99216b2816f07d2b946020ba2e02457 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Wed, 29 Nov 2023 23:40:28 -0800 Subject: ci: workflow automation --- lua/conform/formatters/prettier.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 { -- cgit v1.2.3-70-g09d2