aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadon Rosborough <radon@intuitiveexplanations.com>2024-09-02 17:51:31 -0700
committerRadon Rosborough <radon@intuitiveexplanations.com>2024-09-02 17:51:31 -0700
commit358deff920d5c9b3a6b4c858a75d66fd5ee9b53e (patch)
treebb0ba3fbccb1609112ab4e0ef3811d96211e5320
parentf1492683c10cbe4fd5c03e6a75fb0256bd739c2a (diff)
[#315] Document apheleia-formatters-respect-indent-level
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1abaf2a..dcda887 100644
--- a/README.md
+++ b/README.md
@@ -221,6 +221,25 @@ Apheleia exposes some hooks for advanced customization:
one of these returns non-nil then `apheleia-mode` is not enabled in
the buffer.
+### Formatter configuration
+
+There is no configuration interface in Apheleia for formatter
+behavior. The way to configure a formatter is by editing a standard
+config file that it reads (e.g. `.prettierrc.json`), or setting an
+environment variable that it reads, or by changing the entry in
+`apheleia-formatters` to customize the command-line arguments.
+
+There is one exception to this, which is that Apheleia's default
+command-line arguments for the built-in formatters will automatically
+check Emacs' indentation options for the corresponding major mode, and
+pass that information to the formatter. This way, the indentation
+(tabs vs spaces, and how many) applied by the formatter will match
+what electric indentation in Emacs is doing, preventing a shuffle back
+and forth as you type.
+
+This behavior can be disabled by setting
+`apheleia-formatters-respect-indent-level` to nil.
+
## Troubleshooting
Try running your formatter outside of Emacs to verify it works there.