aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/runner.lua
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2024-01-21 10:49:44 -0800
committerSteven Arcangeli <stevearc@stevearc.com>2024-01-21 10:49:44 -0800
commit9a785eb8f0199ac47ce8bb9e9b6103de5ad8e3a7 (patch)
tree107c70dc4e872ae64e0e7309013c99ded8255b19 /lua/conform/runner.lua
parentcbc5745bf7519acaf3a5cbaaa677fd556aa813d7 (diff)
fix: handle windows line endings (#274)
Diffstat (limited to 'lua/conform/runner.lua')
-rw-r--r--lua/conform/runner.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/conform/runner.lua b/lua/conform/runner.lua
index 3d9df8b..725e824 100644
--- a/lua/conform/runner.lua
+++ b/lua/conform/runner.lua
@@ -341,7 +341,7 @@ local function run_formatter(bufnr, formatter, config, ctx, input_lines, opts, c
local stat = assert(uv.fs_fstat(fd))
local content = assert(uv.fs_read(fd, stat.size))
uv.fs_close(fd)
- output = vim.split(content, "\n", { plain = true })
+ output = vim.split(content, "\r?\n", {})
else
output = stdout
end