Skip to main content

Module formatter

Module formatter 

Source
Expand description

Auto-formatting support for edited files.

Detects system-available formatters (rustfmt, prettier, black, gofmt, etc.) and runs the appropriate one after file write/edit operations.

Structs§

FormatterInfo
Information about a formatter.

Functions§

apply_config
Apply formatter config overrides from AppConfig.formatter.
detect_formatters
Detect which formatters are available on the system. Results are cached after the first call.
disable_formatter
Disable a specific formatter by name.
enable_formatter
Enable a previously disabled formatter.
format_file
Run the appropriate formatter on a file.
format_file_with_config
Format a file using a custom formatter from config (if available).
get_formatter_for_file
Get the best formatter for a given file path.
get_status
Get status of all formatters.