-
Notifications
You must be signed in to change notification settings - Fork 420
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
Support formatter options #2702
Comments
I'd like and would use this. Especially useful for libraries with macros usually used without parens that want to write documentation with Livebook. (Edit: I see this is the primary consideration talked about in the linked past discussion was well 😄) |
I was the trigger for this issue over on slack a few days ago. I've been running into this with heex for building svg visualization in livebook, where the elixir code would format, but the heex markup wouldn't. Especially with tools like phoenix_playground components might become something more people build in livebook as well, even though this wasn't my usecase. |
Currently Livebook formats the code without respecting any plugins or formatter options. We could add
Kino.formatter_options(...)
with options matching.formatter.exs
. The logic would be similar to themix format
task. In order to handle:import_deps
, we would need to traverse the dependencies and read their.formatter.exs
. There is no public API to do this for theMix.install/1
project, but we could possibly makeMix.in_install_dir/1
public in Elixir.For now this issue is mostly to track interest and use cases.
Also see prior discussion in #1212.
The text was updated successfully, but these errors were encountered: