Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ You can view this list in vim with `:help conform-formatters`
- [treefmt](https://github.com/numtide/treefmt) - one CLI to format your repo.
- [trim_newlines](https://github.com/stevearc/conform.nvim/blob/master/lua/conform/formatters/trim_newlines.lua) - Trim empty lines at the end of the file.
- [trim_whitespace](https://github.com/stevearc/conform.nvim/blob/master/lua/conform/formatters/trim_whitespace.lua) - Trim trailing whitespace.
- [trunk](https://docs.trunk.io/code-quality/overview/getting-started/commands-reference/code-quality#trunk-check-run-format) - Trunk universal formatter
- [twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) - Automatically fix Twig Coding Standards issues
- [typespec](https://github.com/microsoft/typespec) - TypeSpec compiler and CLI.
- [typos](https://github.com/crate-ci/typos) - Source code spell checker
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ FORMATTERS *conform-formatter
`treefmt` - one CLI to format your repo.
`trim_newlines` - Trim empty lines at the end of the file.
`trim_whitespace` - Trim trailing whitespace.
`trunk` - Trunk universal formatter
`twig-cs-fixer` - Automatically fix Twig Coding Standards issues
`typespec` - TypeSpec compiler and CLI.
`typos` - Source code spell checker
Expand Down
11 changes: 11 additions & 0 deletions lua/conform/formatters/trunk.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
local util = require("conform.util")
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://docs.trunk.io/code-quality/overview/getting-started/commands-reference/code-quality#trunk-check-run-format",
description = "Trunk universal formatter.",
},
command = util.from_node_modules("trunk"),
args = { "fmt", "$FILENAME" },
stdin = false,
}