aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMohsin Kaleem <mohkale@kisara.moe>2021-11-21 18:45:50 +0000
committerGitHub <noreply@github.com>2021-11-21 10:45:50 -0800
commit2cf903e9a2faa3b50c97896b59361960472330f9 (patch)
tree1c470ea9956abec52b248ebeb9932efcb247072a /README.md
parent8e0605cc29732ec889b7318dd57921bf3f5ba06c (diff)
Support non-file buffers (#52) (#59)
* Support non-file buffers (#52) Closes #52 * Apply suggestions from code review * Oops, my bad Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index c4f7241..00fa7f1 100644
--- a/README.md
+++ b/README.md
@@ -107,6 +107,18 @@ variables:
only when it is bound. Observe that one of these evaluations
returns a list of flags whereas the other returns a single
string. These are substituted into the command as you'd expect.
+ * You can also use Apheleia to format buffers that have no underlying
+ files. In this case the value of `file` and `filepath` will be
+ the name of the current buffer with any special characters for
+ the file-system (such as `*` on windows) being stripped out.
+
+ This is also how the extension for any temporary files apheleia
+ might create will be determined. If you're using a formatter
+ that determines the file-type from the extension you should name
+ such buffers such that their suffixed with the extension. For
+ example a buffer called `*foo-bar.c*` that has no associated
+ file will have an implicit file-name of `foo-bar.c` and any
+ temporary files will be suffixed with a `.c` extension.
* `apheleia-mode-alist`: Alist mapping major modes and filename
regexps to names of formatters to use in those modes and files. See
the docstring for more information.