You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the formatter from command line via mix format the formatter respects the configuration that is imported from dependencies. The same does not seem to apply to the "format on save" feature in Visual Studio Code.
I have set up an example repository to reproduce this issue. Steps to reproduce:
Clone the repo
Run mix format from command line. Notice that the formatter exits without changing the schema.ex file, because the .formatter.exs file imports the configuration that is exported by Absinthe
Open the project with Visual Studio Code, edit the workspace settings to enable "editor.formatOnSave", open the schema.ex file and save it
Upon saving the file the formatter will add parentheses to the schema.ex file, even if the Absinthe formatter configuration declares those functions/macros as locals_without_parens
The text was updated successfully, but these errors were encountered:
Ah, looks like they've added a lot of configuration options to the format task since I added support for it to ElixirLS. Unfortunately, supporting those features right now will likely involve copy-and-pasting a lot of private functions from Elixir. I'm willing to do that, but I think I also will send a PR to try to export some of the configuration functionality from Mix.Tasks.Format in future Elixir versions.
When running the formatter from command line via
mix format
the formatter respects the configuration that is imported from dependencies. The same does not seem to apply to the "format on save" feature in Visual Studio Code.I have set up an example repository to reproduce this issue. Steps to reproduce:
mix format
from command line. Notice that the formatter exits without changing theschema.ex
file, because the.formatter.exs
file imports the configuration that is exported by Absintheschema.ex
file and save itschema.ex
file, even if the Absinthe formatter configuration declares those functions/macros as locals_without_parensThe text was updated successfully, but these errors were encountered: