-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explaining initial configuration setup in README.md #181
Comments
Yes please! I too just spent an hour in the same hole. |
Here is a basic example that also sets the default formatters: (use-package format-all
:hook
(
(ess-r-mode . format-all-mode)
(python-mode . format-all-mode)
(format-all-mode-hook . format-all-ensure-formatter)
)
:config
(custom-set-variables
'(format-all-formatters (quote (("Python" black) ("R" styler))))
)
) |
One thing I was a bit stuck on was how to enable multiple formatters for a single language. For me, this worked quite well. I think perhaps adding an example like this to the README could be useful? (use-package format-all
:hook
(eglot-managed-mode . format-all-mode)
:config
(setq-default format-all-formatters
'(("Python" (isort) (ruff) (black)))))
|
Sorry, I know the readme sucks. PRs to improve it are very welcome. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just spend a couple of hours diagnosing why i could not get "format on save" to work. I wanted to share my experience here to save others going through the same.
At first it wasn't clear to me that you need to define a default formatter make
format-all-buffer
work. Eventually it turned out i just had to callformat-all-ensure-formatter
. This is already in the documentation but it's written in such a manner that I did not pick it up.Suggestion: a rewrite of the "How to customize" chapter.
Adding a quickstart code example would help as well.
For example:
The text was updated successfully, but these errors were encountered: