aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorDimitris Hatziyannis <7132507+dimhatz@users.noreply.github.com>2024-04-17 17:04:50 +0300
committerGitHub <noreply@github.com>2024-04-17 10:04:50 -0400
commita6965ac128eba75537ec2bc5ddd5d5e357062bdc (patch)
tree8305e2c575b456d8301311ccfcbd88f07678b5b4 /lua
parent34d3c5f58017b1a7e1cd23739b263d7af0f66d7c (diff)
fix(prettierd): correctly find prettierd executable on windows (#378)
Diffstat (limited to 'lua')
-rw-r--r--lua/conform/formatters/prettierd.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/conform/formatters/prettierd.lua b/lua/conform/formatters/prettierd.lua
index a030431..2dcd497 100644
--- a/lua/conform/formatters/prettierd.lua
+++ b/lua/conform/formatters/prettierd.lua
@@ -1,3 +1,4 @@
+local fs = require("conform.fs")
local util = require("conform.util")
---@type conform.FileFormatterConfig
return {
@@ -5,7 +6,7 @@ return {
url = "https://github.com/fsouza/prettierd",
description = "prettier, as a daemon, for ludicrous formatting speed.",
},
- command = util.from_node_modules("prettierd"),
+ command = util.from_node_modules(fs.is_windows and "prettierd.cmd" or "prettierd"),
args = { "$FILENAME" },
range_args = function(self, ctx)
local start_offset, end_offset = util.get_offsets_from_range(ctx.buf, ctx.range)