Skip to content

Commit

Permalink
[#315] Document apheleia-formatters-respect-indent-level
Browse files Browse the repository at this point in the history
  • Loading branch information
raxod502 committed Sep 3, 2024
1 parent f149268 commit 358deff
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 358deff

Please sign in to comment.