diff options
author | Steven Arcangeli <stevearc@stevearc.com> | 2023-12-24 12:38:19 -0500 |
---|---|---|
committer | Steven Arcangeli <stevearc@stevearc.com> | 2023-12-24 12:38:19 -0500 |
commit | 7396fc0208539e2bd70e3e446f27529e28dba12b (patch) | |
tree | a3a4d147e7c21029abe8cffb6924693ad2e49d06 /lua/conform/formatters | |
parent | 41852493b5abd7b5a0fd61ff007994c777a08ec9 (diff) |
fix(prettier): use correct prettier executable on windows (#236)
Diffstat (limited to 'lua/conform/formatters')
-rw-r--r-- | lua/conform/formatters/prettier.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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, |