diff options
| author | Radon Rosborough <radon@intuitiveexplanations.com> | 2024-09-02 17:51:31 -0700 |
|---|---|---|
| committer | Radon Rosborough <radon@intuitiveexplanations.com> | 2024-09-02 17:51:31 -0700 |
| commit | 358deff920d5c9b3a6b4c858a75d66fd5ee9b53e (patch) | |
| tree | bb0ba3fbccb1609112ab4e0ef3811d96211e5320 | |
| parent | f1492683c10cbe4fd5c03e6a75fb0256bd739c2a (diff) | |
[#315] Document apheleia-formatters-respect-indent-level
| -rw-r--r-- | README.md | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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. |
