Commit graph

24 commits

Author SHA1 Message Date
Radon Rosborough
4178439d43
[#226] Add debug logs (#235)
Adds a way to properly diagnose performance issues like those reported
in https://github.com/radian-software/apheleia/issues/226.
2023-10-29 16:25:04 -07:00
Radon Rosborough
108176abe5 Update links 2023-08-26 09:05:35 -07:00
Radon Rosborough
c222927f70 Add notes on .dir-locals.el to README
Closes #190
2023-07-19 17:21:07 -07:00
Dan
a82e40c450
Introduce apheleia-inhibit-functions (#138)
Fixes #134

(I accidentally force-pushed #135 from a shallow repo)

Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
2022-11-12 03:28:40 +00:00
Valeriy Litkovskyy
d72168740a
Make apheleia-mode lighter customizable (#143)
<!--

To expedite the pull request process, please see the contributor guide
for my projects:

  <https://github.com/raxod502/contributor-guide>

-->

Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
2022-11-12 03:03:14 +00:00
Ellis Kenyő
4c66f76b22
docs: add note about wiki (#129)
Refs:
https://github.com/radian-software/apheleia/issues/115#issuecomment-1246138394
2022-09-14 14:22:56 +01:00
Radon Rosborough
9ed3c9d72a
[#82] Fix typo
Closes #82
2022-03-20 15:38:33 -07:00
Radon Rosborough
53f243b111
Add formatter tests (#72)
Closes #24
Builds on #25 by @PrimaryCanary
2022-01-05 15:35:12 -08:00
Radon Rosborough
6b8d794188 [#20] Document 65,536-char issue 2022-01-04 16:01:28 -08:00
Radon Rosborough
a7e1b82777 [#46] Add apheleia-goto-error 2022-01-04 15:56:12 -08:00
Radon Rosborough
38fb69019f [#69] More logging improvements, new hook 2022-01-04 15:32:38 -08:00
Radon Rosborough
54844c3988 [#69] Improvements to Apheleia logging
* Rename apheleia-hide-log-buffer to apheleia-hide-log-buffers.
* Rename apheleia-verbose to apheleia-log-only-errors (note, meaning
  is inverted).
* Add apheleia-hide-old-log-entries.
* Include more information in log and format it more neatly.
* Convert log buffer to special-mode and attempt to keep point at the
  end (although this is not working for an undetermined reason).
2022-01-03 20:12:52 -08:00
Mohsin Kaleem
2e98165137
[#62] Support functions as formatters (#63)
* [#62] Support functions as formatters

Closes #62.

Lets you use a lisp function as a formatter. This gives apheleia a lot
more flexibility in regards to what constitutes a formatter. For example
you can now plug an external language server or another tool as a
formatter for use with apheleia.

Here's a very basic example of using indent-line-function with apheleia
after merging this commit. Note: this doesn't take into account any
special local variables in the original buffer such as lisp-body-indent.
It's really just for demonstration purposes and as a proof of concept.

```lisp
(defun apheleia-indent-region+ (orig scratch callback)
  (with-current-buffer scratch
    (setq-local indent-line-function
                (buffer-local-value 'indent-line-function orig))
    (indent-region (point-min)
                   (point-max))
    (funcall callback scratch)))

(push '(indent-region . apheleia-indent-region+) apheleia-formatters)
(push '(elisp-mode . indent-region) apheleia-mode-alist)
(push '(lisp-interaction-mode . indent-region) apheleia-mode-alist)
```

* Fix misc-bugs + prevent race conditions

* Update docstring

* Reword a bit

* Add to README

Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
2021-12-27 10:00:21 -08:00
Mohsin Kaleem
2cf903e9a2
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>
2021-11-21 10:45:50 -08:00
Radon Rosborough
b71a5f615a [#57] Document inclusion on MELPA 2021-11-07 09:58:43 -08:00
Mohsin Kaleem
1b7f2cf996
Evaluate any non-special args in apheleia-formatters (#55) (#56)
* Evaluate any non-special args in apheleia-formatters (#55)

Allows you to place snippets of elisp within a formatter command that
will be evaluated and substituted in place when apheleia decides to run
that command.

* Update apheleia.el

Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
2021-10-31 10:57:44 -07:00
Mohsin Kaleem
1bf7db7477
Support multiple formatters (#31) (#51)
* Support multiple formatters (#31)

Closes #31

This commit makes it so apheleia can run multiple formatters one after
the other and use the resultant output to format the current buffer.
This works somewhat like a pipeline. The output of one formatter becomes
the input to the next formatter until all formatters have run and then
an RCS patch is built from the resultant output and applied to the
current buffer.

Note: For convenience we internally represent the users configuration as
a list of formatters even when it may only be one. For example if the
user has configured `(python-mode . black)` in apheleia-mode-alist then
internally we interpret that as a formatter list of `(black)` instead of
`black` as we did previously.

* Support multiple formatters (#31)

Closes #31

This commit makes it so apheleia can run multiple formatters one after
the other and use the resultant output to format the current buffer.
This works somewhat like a pipeline. The output of one formatter becomes
the input to the next formatter until all formatters have run and then
an RCS patch is built from the resultant output and applied to the
current buffer.

Note: For convenience we internally represent the users configuration as
a list of formatters even when it may only be one. For example if the
user has configured `(python-mode . black)` in apheleia-mode-alist then
internally we interpret that as a formatter list of `(black)` instead of
`black` as we did previously.

* Make some changes

* Make some changes

* Error when a (not-first) formatter uses file or filepath

* Prevent formatter recieving stdin when using `file'

Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
2021-10-24 18:28:18 -07:00
Radon Rosborough
3e342632b8 [#14] Explain how to modify alist 2020-05-10 10:32:04 -06:00
Radon Rosborough
bd61b7204d Link to contributor guide 2020-05-03 08:30:02 -06:00
Radon Rosborough
707930e247 Document apheleia-max-alignment-size 2020-03-19 08:21:18 -06:00
Radon Rosborough
68d8755333 Migrate from Semaphore CI to CircleCI 2019-11-16 22:01:04 -08:00
Radon Rosborough
e28a264989 Disable automatically for remote files 2019-09-20 17:08:43 -07:00
Radon Rosborough
903d6b810c Add apheleia-post-format-hook 2019-07-17 11:26:52 -07:00
Radon Rosborough
f2ae6c7f29 Add basic documentation 2019-07-10 22:50:08 -07:00