Variable: apheleia-remote-algorithm

apheleia-remote-algorithm is a customizable variable defined in apheleia-formatters.el.

Value

cancel

Documentation

How apheleia should process remote files/buffers.

Set to cancel to immediately fail whenever you try to format a remote buffer.

Set to remote to make apheleia spawn the process and any other temporary files on the same remote machine the buffer is on. Note due to restrictions with tramp when this option is set apheleia will run any formatters synchronously, meaning Emacs will block until formatting the buffer finishes. For more information see: https://www.mail-archive.com/tramp-devel@gnu.org/msg05623.html

Set to local to make apheleia run the formatter on the current machine and then write the formatted output back to the remote machine. Note some features of apheleia (such as file in apheleia-formatters) is not compatible with this option and formatters relying on them will crash.

Source Code

;; Defined in /nix/store/lwcwryzabcmvjcwwzzs65jrwf7p7d7cs-emacs-packages-deps/share/emacs/site-lisp/elpa/apheleia-20260915.1628/apheleia-formatters.el
(defcustom apheleia-remote-algorithm 'cancel
  "How `apheleia' should process remote files/buffers.
Set to `cancel' to immediately fail whenever you try to format a remote
buffer.

Set to `remote' to make apheleia spawn the process and any other temporary
files on the same remote machine the buffer is on. Note due to restrictions
with `tramp' when this option is set `apheleia' will run any formatters
synchronously, meaning Emacs will block until formatting the buffer finishes.
For more information see:
https://www.mail-archive.com/tramp-devel@gnu.org/msg05623.html

Set to `local' to make `apheleia' run the formatter on the current machine
and then write the formatted output back to the remote machine. Note some
features of `apheleia' (such as `file' in `apheleia-formatters') is not
compatible with this option and formatters relying on them will crash."
  :type '(choice (const :tag "Run the formatter on the local machine" local)
                 (const :tag "Run the formatter on the remote machine" remote)
                 (const :tag "Disable formatting for remote buffers" cancel))
  :group 'apheleia)