Expand description
Formatter routing for ctx_refactor action=reformat: pick a formatter by
file extension, using built-in routing per extension.
Enums§
- Formatter
- The formatter selected for a file: either the IDE HTTP backend or an external
shell command (template with a
{file}placeholder).
Functions§
- blake3_
of - Hex BLAKE3 of the file content, for honest before/after change detection.
- build_
argv - Split a command template into argv, substituting the
{file}placeholder withabs_path.{file}may be a standalone token or embedded in a token. If no placeholder is present,abs_pathis appended as the final argument. The path is always a single argv element (spaces in the path are preserved). - command_
label - The binary name of a command template, for the
via <name>output label. - resolve_
formatter - Pick the formatter for
abs_pathusing built-in defaults per extension. Extension match is case-insensitive; no extension or an unknown extension →Jetbrains. - run_
command_ formatter - Run an external formatter command on
abs_pathwith cwdproject_root(so tool config likerustfmt.tomlis discovered). ReturnsErrwith a clear message if the binary is missing or the command exits non-zero.