Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lua/conform/formatters/tex-fmt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@ return {
description = "An extremely fast LaTeX formatter written in Rust.",
},
command = "tex-fmt",
args = { "-s" },
args = function(self, ctx)
local args = {
"--stdin",
"--tabsize",
ctx.shiftwidth,
}

if not vim.bo[ctx.buf].expandtab then
table.insert(args, "--usetabs")
end

return args
end,
}
Loading