Skip to content

Commit 7f4c911

Browse files
committed
fix(tex-fmt): not using tabs when prefered
1 parent 086a40d commit 7f4c911

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

lua/conform/formatters/tex-fmt.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,17 @@ return {
55
description = "An extremely fast LaTeX formatter written in Rust.",
66
},
77
command = "tex-fmt",
8-
args = { "-s" },
8+
args = function(self, ctx)
9+
local args = {
10+
"--stdin",
11+
"--tabsize",
12+
ctx.shiftwidth,
13+
}
14+
15+
if not vim.bo[ctx.buf].expandtab then
16+
table.insert(args, "--usetabs")
17+
end
18+
19+
return args
20+
end,
921
}

0 commit comments

Comments
 (0)