From 7396fc0208539e2bd70e3e446f27529e28dba12b Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Sun, 24 Dec 2023 12:38:19 -0500 Subject: fix(prettier): use correct prettier executable on windows (#236) --- lua/conform/formatters/prettier.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/conform/formatters/prettier.lua b/lua/conform/formatters/prettier.lua index e11eec8..0977748 100644 --- a/lua/conform/formatters/prettier.lua +++ b/lua/conform/formatters/prettier.lua @@ -1,3 +1,4 @@ +local fs = require("conform.fs") local util = require("conform.util") --- Helper function to parse options to into a parser if available @@ -49,7 +50,7 @@ return { -- qmd = "markdown", }, }, - command = util.from_node_modules("prettier"), + command = util.from_node_modules(fs.is_windows and "prettier.cmd" or "prettier"), args = function(self, ctx) return eval_parser(self, ctx) or { "--stdin-filepath", "$FILENAME" } end, -- cgit v1.2.3-70-g09d2